From a9375d6bac0521732304af6f749d12090269d8d3 Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Thu, 4 Jul 2024 14:10:33 -0400 Subject: [PATCH] wlr_scene: Drop map/unmap listeners from layer_shell_v1 Redundant. --- types/scene/layer_shell_v1.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/types/scene/layer_shell_v1.c b/types/scene/layer_shell_v1.c index 6f50d575..86e8a349 100644 --- a/types/scene/layer_shell_v1.c +++ b/types/scene/layer_shell_v1.c @@ -9,8 +9,6 @@ static void scene_layer_surface_handle_tree_destroy( // tree and surface_node will be cleaned up by scene_node_finish wl_list_remove(&scene_layer_surface->tree_destroy.link); wl_list_remove(&scene_layer_surface->layer_surface_destroy.link); - wl_list_remove(&scene_layer_surface->layer_surface_map.link); - wl_list_remove(&scene_layer_surface->layer_surface_unmap.link); free(scene_layer_surface); } @@ -21,20 +19,6 @@ static void scene_layer_surface_handle_layer_surface_destroy( wlr_scene_node_destroy(&scene_layer_surface->tree->node); } -static void scene_layer_surface_handle_layer_surface_map( - struct wl_listener *listener, void *data) { - struct wlr_scene_layer_surface_v1 *scene_layer_surface = - wl_container_of(listener, scene_layer_surface, layer_surface_map); - wlr_scene_node_set_enabled(&scene_layer_surface->tree->node, true); -} - -static void scene_layer_surface_handle_layer_surface_unmap( - struct wl_listener *listener, void *data) { - struct wlr_scene_layer_surface_v1 *scene_layer_surface = - wl_container_of(listener, scene_layer_surface, layer_surface_unmap); - wlr_scene_node_set_enabled(&scene_layer_surface->tree->node, false); -} - static void layer_surface_exclusive_zone( struct wlr_layer_surface_v1_state *state, struct wlr_box *usable_area) { @@ -176,16 +160,6 @@ struct wlr_scene_layer_surface_v1 *wlr_scene_layer_surface_v1_create( wl_signal_add(&layer_surface->events.destroy, &scene_layer_surface->layer_surface_destroy); - scene_layer_surface->layer_surface_map.notify = - scene_layer_surface_handle_layer_surface_map; - wl_signal_add(&layer_surface->surface->events.map, - &scene_layer_surface->layer_surface_map); - - scene_layer_surface->layer_surface_unmap.notify = - scene_layer_surface_handle_layer_surface_unmap; - wl_signal_add(&layer_surface->surface->events.unmap, - &scene_layer_surface->layer_surface_unmap); - wlr_scene_node_set_enabled(&scene_layer_surface->tree->node, layer_surface->surface->mapped);