[gtk/wip/matthiasc/popup4: 60/94] wip: popup surface type



commit d51522fd07fcbf8391995a508fe0630ca16d0a0b
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Apr 22 13:16:26 2019 +0000

    wip: popup surface type

 gdk/gdksurface.c | 4 ++--
 gdk/gdksurface.h | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 5cb326449a..7e2bceacd4 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -794,8 +794,8 @@ gdk_surface_new_popup (GdkDisplay *display,
   g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
   g_return_val_if_fail (GDK_IS_SURFACE (parent), NULL);
 
-  surface = gdk_surface_new (display, GDK_SURFACE_TEMP,
-                             NULL, 0, 0, 100, 100);
+  surface = gdk_surface_new (display, GDK_SURFACE_POPUP,
+                             parent, 0, 0, 100, 100);
 
   gdk_surface_set_transient_for (surface, parent);
   gdk_surface_set_type_hint (surface, GDK_SURFACE_TYPE_HINT_MENU);
diff --git a/gdk/gdksurface.h b/gdk/gdksurface.h
index f3ab38f851..938c59ba17 100644
--- a/gdk/gdksurface.h
+++ b/gdk/gdksurface.h
@@ -43,6 +43,7 @@ typedef struct _GdkGeometry          GdkGeometry;
  * GdkSurfaceType:
  * @GDK_SURFACE_TOPLEVEL: toplevel window (used to implement #GtkWindow)
  * @GDK_SURFACE_TEMP: override redirect temporary surface (used to implement #GtkMenu)
+ * @GDK_SURFACE_POPUP: popup window with semantics like xdg-popover
  *
  * Describes the kind of surface.
  */
@@ -50,6 +51,7 @@ typedef enum
 {
   GDK_SURFACE_TOPLEVEL,
   GDK_SURFACE_TEMP,
+  GDK_SURFACE_POPUP
 } GdkSurfaceType;
 
 /* Size restriction enumeration.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]