wayland: Remove own pointer to the popup parent

It's there already as the GdkSurface::parent, no need to duplicate.
This commit is contained in:
Jonas Ådahl 2020-03-17 15:26:58 +01:00
parent 0e601c0a70
commit ab6b5ae568

View File

@ -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);