[gtk/wip/matthiasc/popup4: 104/140] surface: Store popup parent
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup4: 104/140] surface: Store popup parent
- Date: Mon, 29 Apr 2019 02:50:26 +0000 (UTC)
commit 194ee05f2f8c7a7fa0dd5ebdcf405b5b49bd9adb
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Apr 22 14:21:17 2019 +0000
surface: Store popup parent
Store popup parents separately from transient-for parents,
since these are separate concepts with different behaviors.
gdk/broadway/gdksurface-broadway.c | 1 +
gdk/gdksurfaceprivate.h | 3 ++-
gdk/wayland/gdksurface-wayland.c | 1 +
gdk/x11/gdksurface-x11.c | 1 +
4 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gdk/broadway/gdksurface-broadway.c b/gdk/broadway/gdksurface-broadway.c
index 53d74a461e..c4740d3fa6 100644
--- a/gdk/broadway/gdksurface-broadway.c
+++ b/gdk/broadway/gdksurface-broadway.c
@@ -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;
diff --git a/gdk/gdksurfaceprivate.h b/gdk/gdksurfaceprivate.h
index f2855ae996..25319c6b38 100644
--- a/gdk/gdksurfaceprivate.h
+++ b/gdk/gdksurfaceprivate.h
@@ -32,7 +32,8 @@ struct _GdkSurface
GdkDisplay *display;
- GdkSurface *transient_for;
+ GdkSurface *transient_for; /* for toplevels */
+ GdkSurface *parent; /* for popups */
gpointer widget;
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index d70c0a75cf..1c8bb376dc 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -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;
diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c
index f3b138d530..730d903432 100644
--- a/gdk/x11/gdksurface-x11.c
+++ b/gdk/x11/gdksurface-x11.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]