mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
gdk: Introduce a popup surface type
This surface type is meant to have semantics similar to xdg-popup, with a mandatory parent, and relative placement using gdk_surface_move_to_rect.
This commit is contained in:
parent
07b3a093bf
commit
33c6dff881
@ -812,8 +812,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);
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user