surface: Store popup parent

Store popup parents separately from transient-for
parents, since these are separate concepts with
different behaviors. And we need the parent in
the frontend, so we can use it in the fallback
move-to-rect implementation.
This commit is contained in:
Matthias Clasen 2019-04-22 14:21:17 +00:00
parent 33c6dff881
commit 9af6d7f733
4 changed files with 5 additions and 1 deletions

View File

@ -208,6 +208,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

@ -531,6 +531,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;