Migrated to the scene graph API

This commit is contained in:
Keith Bowes 2022-02-27 13:57:34 -05:00
parent 03fbe71903
commit d7b799ab80
12 changed files with 196 additions and 271 deletions

View file

@ -6,6 +6,7 @@
#include <wlr/render/wlr_renderer.h>
#include <wlr/render/wlr_texture.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_xdg_output_v1.h>
#include "waybox/server.h"
@ -14,7 +15,9 @@ struct wb_output {
struct wlr_output *wlr_output;
struct wb_server *server;
struct wl_list layers[4];
struct wl_list layers[4]; /* wb_layer_surface::link */
struct wlr_scene_rect *scene_rect;
struct wl_listener destroy;
struct wl_listener frame;
@ -29,9 +32,9 @@ struct wb_view {
#if !WLR_CHECK_VERSION(0, 16, 0)
struct wlr_xdg_surface *xdg_surface;
#endif
struct wlr_scene_node *scene_node;
struct wlr_xdg_toplevel_decoration_v1 *decoration;
int decoration_height;
struct wl_listener map;
struct wl_listener unmap;
@ -41,8 +44,6 @@ struct wb_view {
struct wl_listener request_minimize;
struct wl_listener request_move;
struct wl_listener request_resize;
struct wl_listener surface_commit;
bool mapped;
struct wlr_box current_position;
struct wlr_box previous_position;

View file

@ -16,7 +16,6 @@
#include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_idle.h>
#include <wlr/types/wlr_screencopy_v1.h>
#include <wlr/types/wlr_matrix.h>
#include <wlr/types/wlr_gamma_control_v1.h>
#include <wlr/types/wlr_output_layout.h>
#if WLR_CHECK_VERSION(0, 16, 0)
@ -49,6 +48,7 @@ struct wb_server {
struct wlr_output_layout *output_layout;
struct wlr_xdg_output_manager_v1 *output_manager;
struct wlr_renderer *renderer;
struct wlr_scene *scene;
#if WLR_CHECK_VERSION(0, 16, 0)
struct wlr_subcompositor *subcompositor;
#endif

View file

@ -5,7 +5,7 @@
void init_xdg_shell(struct wb_server *server);
void focus_view(struct wb_view *view, struct wlr_surface *surface);
struct wb_view *desktop_view_at(
struct wb_view *get_view_at(
struct wb_server *server, double lx, double ly,
struct wlr_surface **surface, double *sx, double *sy);
#endif