wlr_scene: Expose wlr_scene_xdg_surface

So that the compositor can access the subsurface tree
This commit is contained in:
Alexander Orzechowski 2024-07-04 13:38:33 -04:00
parent 6cb062aac1
commit 541ee0c45d
3 changed files with 28 additions and 26 deletions

View file

@ -2,16 +2,6 @@
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_xdg_shell.h>
struct wlr_scene_xdg_surface {
struct wlr_scene_tree *tree;
struct wlr_xdg_surface *xdg_surface;
struct wlr_scene_subsurface_tree *surface_tree;
struct wl_listener tree_destroy;
struct wl_listener xdg_surface_destroy;
struct wl_listener xdg_surface_commit;
};
static void scene_xdg_surface_handle_tree_destroy(struct wl_listener *listener,
void *data) {
struct wlr_scene_xdg_surface *scene_xdg_surface =
@ -55,7 +45,7 @@ static void scene_xdg_surface_handle_xdg_surface_commit(struct wl_listener *list
scene_xdg_surface_update_position(scene_xdg_surface);
}
struct wlr_scene_tree *wlr_scene_xdg_surface_create(
struct wlr_scene_xdg_surface *wlr_scene_xdg_surface_create(
struct wlr_scene_tree *parent, struct wlr_xdg_surface *xdg_surface) {
struct wlr_scene_xdg_surface *scene_xdg_surface =
calloc(1, sizeof(*scene_xdg_surface));
@ -95,5 +85,5 @@ struct wlr_scene_tree *wlr_scene_xdg_surface_create(
scene_xdg_surface_update_position(scene_xdg_surface);
return scene_xdg_surface->tree;
return scene_xdg_surface;
}