From ab6b5ae56812c6fced2c096b2fc42115e6de0e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 17 Mar 2020 15:26:58 +0100 Subject: [PATCH] wayland: Remove own pointer to the popup parent It's there already as the GdkSurface::parent, no need to duplicate. --- gdk/wayland/gdksurface-wayland.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c index cb4d5cfb68..9b18d19993 100644 --- a/gdk/wayland/gdksurface-wayland.c +++ b/gdk/wayland/gdksurface-wayland.c @@ -108,7 +108,6 @@ struct _GdkWaylandSurface unsigned int is_drag_surface : 1; GdkSurfaceTypeHint hint; GdkSurface *transient_for; - GdkSurface *popup_parent; int pending_buffer_offset_x; int pending_buffer_offset_y; @@ -841,8 +840,6 @@ gdk_wayland_surface_dispose (GObject *object) impl = GDK_WAYLAND_SURFACE (surface); - g_clear_object (&impl->popup_parent); - if (impl->event_queue) { GdkWaylandDisplay *display_wayland = @@ -2439,7 +2436,6 @@ gdk_wayland_surface_create_xdg_popup (GdkSurface *surface, freeze_popup_toplevel_state (surface); } - g_set_object (&impl->popup_parent, parent); display->current_popups = g_list_append (display->current_popups, surface); if (grab_input_seat) { @@ -2528,9 +2524,8 @@ unmap_popups_for_surface (GdkSurface *surface) for (l = display_wayland->current_popups; l; l = l->next) { GdkSurface *popup = l->data; - GdkWaylandSurface *popup_impl = GDK_WAYLAND_SURFACE (popup); - if (popup_impl->popup_parent == surface) + if (popup->parent == surface) { g_warning ("Tried to unmap the parent of a popup"); gdk_surface_hide (popup);