summaryrefslogtreecommitdiff
path: root/src/wayland/meta-wayland-popup.c
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2016-01-21 17:03:16 +0800
committerJonas Ådahl <jadahl@gmail.com>2016-05-01 21:11:27 +0800
commit61c717abb355eff5d45344270e3f72e73db8972a (patch)
tree9dc174145af21e6987902a5902f34b9c2f06dfb4 /src/wayland/meta-wayland-popup.c
parent229a143eac5e16c3a0962c58fbb8878b91bafecc (diff)
downloadmutter-61c717abb355eff5d45344270e3f72e73db8972a.tar.gz
wayland: Let the popup surface explicitly dismiss the popup
Instead of relying on destroy signals attached to the corresponding role object, let the roles explicitly dismiss the popup when it should be dismissed. https://bugzilla.gnome.org/show_bug.cgi?id=763431
Diffstat (limited to 'src/wayland/meta-wayland-popup.c')
-rw-r--r--src/wayland/meta-wayland-popup.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/wayland/meta-wayland-popup.c b/src/wayland/meta-wayland-popup.c
index 93fea932e..6c4b78425 100644
--- a/src/wayland/meta-wayland-popup.c
+++ b/src/wayland/meta-wayland-popup.c
@@ -62,7 +62,6 @@ struct _MetaWaylandPopupGrab
struct _MetaWaylandPopup
{
MetaWaylandPopupGrab *grab;
- struct wl_listener surface_destroy_listener;
MetaWaylandPopupSurface *popup_surface;
struct wl_list link;
};
@@ -231,7 +230,6 @@ meta_wayland_popup_destroy (MetaWaylandPopup *popup)
{
meta_wayland_popup_surface_dismiss (popup->popup_surface);
- wl_list_remove (&popup->surface_destroy_listener.link);
wl_list_remove (&popup->link);
g_slice_free (MetaWaylandPopup, popup);
}
@@ -253,16 +251,6 @@ meta_wayland_popup_get_top_popup (MetaWaylandPopup *popup)
return meta_wayland_popup_grab_get_top_popup (popup->grab);
}
-static void
-on_popup_surface_destroy (struct wl_listener *listener,
- void *data)
-{
- MetaWaylandPopup *popup =
- wl_container_of (listener, popup, surface_destroy_listener);
-
- meta_wayland_popup_dismiss (popup);
-}
-
MetaWaylandPopup *
meta_wayland_popup_create (MetaWaylandPopupSurface *popup_surface,
MetaWaylandPopupGrab *grab)
@@ -278,17 +266,6 @@ meta_wayland_popup_create (MetaWaylandPopupSurface *popup_surface,
popup = g_slice_new0 (MetaWaylandPopup);
popup->grab = grab;
popup->popup_surface = popup_surface;
- popup->surface_destroy_listener.notify = on_popup_surface_destroy;
- if (surface->xdg_popup)
- {
- wl_resource_add_destroy_listener (surface->xdg_popup,
- &popup->surface_destroy_listener);
- }
- else if (surface->wl_shell_surface)
- {
- wl_resource_add_destroy_listener (surface->wl_shell_surface,
- &popup->surface_destroy_listener);
- }
wl_list_insert (&grab->all_popups, &popup->link);