|
|
@ -9,8 +9,6 @@ struct wlr_scene_xdg_surface {
|
|
|
|
|
|
|
|
|
|
|
|
struct wl_listener tree_destroy;
|
|
|
|
struct wl_listener tree_destroy;
|
|
|
|
struct wl_listener xdg_surface_destroy;
|
|
|
|
struct wl_listener xdg_surface_destroy;
|
|
|
|
struct wl_listener xdg_surface_map;
|
|
|
|
|
|
|
|
struct wl_listener xdg_surface_unmap;
|
|
|
|
|
|
|
|
struct wl_listener xdg_surface_commit;
|
|
|
|
struct wl_listener xdg_surface_commit;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -21,8 +19,6 @@ static void scene_xdg_surface_handle_tree_destroy(struct wl_listener *listener,
|
|
|
|
// tree and surface_node will be cleaned up by scene_node_finish
|
|
|
|
// tree and surface_node will be cleaned up by scene_node_finish
|
|
|
|
wl_list_remove(&scene_xdg_surface->tree_destroy.link);
|
|
|
|
wl_list_remove(&scene_xdg_surface->tree_destroy.link);
|
|
|
|
wl_list_remove(&scene_xdg_surface->xdg_surface_destroy.link);
|
|
|
|
wl_list_remove(&scene_xdg_surface->xdg_surface_destroy.link);
|
|
|
|
wl_list_remove(&scene_xdg_surface->xdg_surface_map.link);
|
|
|
|
|
|
|
|
wl_list_remove(&scene_xdg_surface->xdg_surface_unmap.link);
|
|
|
|
|
|
|
|
wl_list_remove(&scene_xdg_surface->xdg_surface_commit.link);
|
|
|
|
wl_list_remove(&scene_xdg_surface->xdg_surface_commit.link);
|
|
|
|
free(scene_xdg_surface);
|
|
|
|
free(scene_xdg_surface);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -34,20 +30,6 @@ static void scene_xdg_surface_handle_xdg_surface_destroy(struct wl_listener *lis
|
|
|
|
wlr_scene_node_destroy(&scene_xdg_surface->tree->node);
|
|
|
|
wlr_scene_node_destroy(&scene_xdg_surface->tree->node);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void scene_xdg_surface_handle_xdg_surface_map(struct wl_listener *listener,
|
|
|
|
|
|
|
|
void *data) {
|
|
|
|
|
|
|
|
struct wlr_scene_xdg_surface *scene_xdg_surface =
|
|
|
|
|
|
|
|
wl_container_of(listener, scene_xdg_surface, xdg_surface_map);
|
|
|
|
|
|
|
|
wlr_scene_node_set_enabled(&scene_xdg_surface->tree->node, true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void scene_xdg_surface_handle_xdg_surface_unmap(struct wl_listener *listener,
|
|
|
|
|
|
|
|
void *data) {
|
|
|
|
|
|
|
|
struct wlr_scene_xdg_surface *scene_xdg_surface =
|
|
|
|
|
|
|
|
wl_container_of(listener, scene_xdg_surface, xdg_surface_unmap);
|
|
|
|
|
|
|
|
wlr_scene_node_set_enabled(&scene_xdg_surface->tree->node, false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void scene_xdg_surface_update_position(
|
|
|
|
static void scene_xdg_surface_update_position(
|
|
|
|
struct wlr_scene_xdg_surface *scene_xdg_surface) {
|
|
|
|
struct wlr_scene_xdg_surface *scene_xdg_surface) {
|
|
|
|
struct wlr_xdg_surface *xdg_surface = scene_xdg_surface->xdg_surface;
|
|
|
|
struct wlr_xdg_surface *xdg_surface = scene_xdg_surface->xdg_surface;
|
|
|
@ -106,16 +88,6 @@ struct wlr_scene_tree *wlr_scene_xdg_surface_create(
|
|
|
|
scene_xdg_surface_handle_xdg_surface_destroy;
|
|
|
|
scene_xdg_surface_handle_xdg_surface_destroy;
|
|
|
|
wl_signal_add(&xdg_surface->events.destroy, &scene_xdg_surface->xdg_surface_destroy);
|
|
|
|
wl_signal_add(&xdg_surface->events.destroy, &scene_xdg_surface->xdg_surface_destroy);
|
|
|
|
|
|
|
|
|
|
|
|
scene_xdg_surface->xdg_surface_map.notify =
|
|
|
|
|
|
|
|
scene_xdg_surface_handle_xdg_surface_map;
|
|
|
|
|
|
|
|
wl_signal_add(&xdg_surface->surface->events.map,
|
|
|
|
|
|
|
|
&scene_xdg_surface->xdg_surface_map);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scene_xdg_surface->xdg_surface_unmap.notify =
|
|
|
|
|
|
|
|
scene_xdg_surface_handle_xdg_surface_unmap;
|
|
|
|
|
|
|
|
wl_signal_add(&xdg_surface->surface->events.unmap,
|
|
|
|
|
|
|
|
&scene_xdg_surface->xdg_surface_unmap);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scene_xdg_surface->xdg_surface_commit.notify =
|
|
|
|
scene_xdg_surface->xdg_surface_commit.notify =
|
|
|
|
scene_xdg_surface_handle_xdg_surface_commit;
|
|
|
|
scene_xdg_surface_handle_xdg_surface_commit;
|
|
|
|
wl_signal_add(&xdg_surface->surface->events.commit,
|
|
|
|
wl_signal_add(&xdg_surface->surface->events.commit,
|
|
|
|