surface: Store popup parent

Store popup parents separately from transient-for parents,
since these are separate concepts with different behaviors.
This commit is contained in:
Matthias Clasen
2019-04-22 14:21:17 +00:00
parent 3da781e2fe
commit 194ee05f2f
4 changed files with 5 additions and 1 deletions

View File

@@ -205,6 +205,7 @@ _gdk_broadway_display_create_surface (GdkDisplay *display,
g_object_unref (frame_clock);
surface->surface_type = surface_type;
surface->parent = parent;
surface->x = x;
surface->y = y;
surface->width = width;

View File

@@ -32,7 +32,8 @@ struct _GdkSurface
GdkDisplay *display;
GdkSurface *transient_for;
GdkSurface *transient_for; /* for toplevels */
GdkSurface *parent; /* for popups */
gpointer widget;

View File

@@ -535,6 +535,7 @@ _gdk_wayland_display_create_surface (GdkDisplay *display,
}
surface->surface_type = surface_type;
surface->parent = parent;
surface->x = x;
surface->y = y;
surface->width = width;

View File

@@ -811,6 +811,7 @@ _gdk_x11_display_create_surface (GdkDisplay *display,
g_object_unref (frame_clock);
surface->surface_type = surface_type;
surface->parent = parent;
surface->x = x;
surface->y = y;
surface->width = width;