aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/xdg_shell_v6.c
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-05-12 19:33:38 +0100
committerLibravatar emersion <contact@emersion.fr>2018-05-12 19:33:38 +0100
commit360e63b8a73836b85b44980ce7e0f77348d43df3 (patch)
tree963c5348e2d48ed188e2d4f08ecb01898f1d116d /sway/desktop/xdg_shell_v6.c
parentMerge pull request #1964 from emersion/wlroots-970 (diff)
downloadsway-360e63b8a73836b85b44980ce7e0f77348d43df3.tar.gz
sway-360e63b8a73836b85b44980ce7e0f77348d43df3.tar.zst
sway-360e63b8a73836b85b44980ce7e0f77348d43df3.zip
Don't destroy view child on xdg-popup unmap
Diffstat (limited to 'sway/desktop/xdg_shell_v6.c')
-rw-r--r--sway/desktop/xdg_shell_v6.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c
index 8ecb330d..e9051b6c 100644
--- a/sway/desktop/xdg_shell_v6.c
+++ b/sway/desktop/xdg_shell_v6.c
@@ -20,7 +20,6 @@ static void popup_destroy(struct sway_view_child *child) {
20 } 20 }
21 struct sway_xdg_popup_v6 *popup = (struct sway_xdg_popup_v6 *)child; 21 struct sway_xdg_popup_v6 *popup = (struct sway_xdg_popup_v6 *)child;
22 wl_list_remove(&popup->new_popup.link); 22 wl_list_remove(&popup->new_popup.link);
23 wl_list_remove(&popup->unmap.link);
24 wl_list_remove(&popup->destroy.link); 23 wl_list_remove(&popup->destroy.link);
25 free(popup); 24 free(popup);
26} 25}
@@ -39,11 +38,6 @@ static void popup_handle_new_popup(struct wl_listener *listener, void *data) {
39 popup_create(wlr_popup, popup->child.view); 38 popup_create(wlr_popup, popup->child.view);
40} 39}
41 40
42static void popup_handle_unmap(struct wl_listener *listener, void *data) {
43 struct sway_xdg_popup_v6 *popup = wl_container_of(listener, popup, unmap);
44 view_child_destroy(&popup->child);
45}
46
47static void popup_handle_destroy(struct wl_listener *listener, void *data) { 41static void popup_handle_destroy(struct wl_listener *listener, void *data) {
48 struct sway_xdg_popup_v6 *popup = wl_container_of(listener, popup, destroy); 42 struct sway_xdg_popup_v6 *popup = wl_container_of(listener, popup, destroy);
49 view_child_destroy(&popup->child); 43 view_child_destroy(&popup->child);
@@ -62,8 +56,6 @@ static struct sway_xdg_popup_v6 *popup_create(
62 56
63 wl_signal_add(&xdg_surface->events.new_popup, &popup->new_popup); 57 wl_signal_add(&xdg_surface->events.new_popup, &popup->new_popup);
64 popup->new_popup.notify = popup_handle_new_popup; 58 popup->new_popup.notify = popup_handle_new_popup;
65 wl_signal_add(&xdg_surface->events.unmap, &popup->unmap);
66 popup->unmap.notify = popup_handle_unmap;
67 wl_signal_add(&xdg_surface->events.destroy, &popup->destroy); 59 wl_signal_add(&xdg_surface->events.destroy, &popup->destroy);
68 popup->destroy.notify = popup_handle_destroy; 60 popup->destroy.notify = popup_handle_destroy;
69 61