gdk: Add GDK_WINDOW_SUBSURFACE window type
This window type can only be used on wayland so far, so NULL is returned if it's attempted to be used on any other windowing backend. https://bugzilla.gnome.org/show_bug.cgi?id=729215
This commit is contained in:
@ -45,6 +45,10 @@
|
|||||||
/* for the use of round() */
|
/* for the use of round() */
|
||||||
#include "fallback-c89.c"
|
#include "fallback-c89.c"
|
||||||
|
|
||||||
|
#ifdef GDK_WINDOWING_WAYLAND
|
||||||
|
#include "wayland/gdkwayland.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef DEBUG_WINDOW_PRINTING
|
#undef DEBUG_WINDOW_PRINTING
|
||||||
|
|
||||||
|
|
||||||
@ -1294,6 +1298,15 @@ gdk_window_new (GdkWindow *parent,
|
|||||||
g_warning (G_STRLOC "Toplevel windows must be created as children of\n"
|
g_warning (G_STRLOC "Toplevel windows must be created as children of\n"
|
||||||
"of a window of type GDK_WINDOW_ROOT or GDK_WINDOW_FOREIGN");
|
"of a window of type GDK_WINDOW_ROOT or GDK_WINDOW_FOREIGN");
|
||||||
break;
|
break;
|
||||||
|
case GDK_WINDOW_SUBSURFACE:
|
||||||
|
#ifdef GDK_WINDOWING_WAYLAND
|
||||||
|
if (!GDK_IS_WAYLAND_DISPLAY (display))
|
||||||
|
{
|
||||||
|
g_warning (G_STRLOC "Subsurface windows can only be used on Wayland");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
case GDK_WINDOW_CHILD:
|
case GDK_WINDOW_CHILD:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -68,6 +68,9 @@ typedef enum
|
|||||||
* @GDK_WINDOW_FOREIGN: foreign window (see gdk_window_foreign_new())
|
* @GDK_WINDOW_FOREIGN: foreign window (see gdk_window_foreign_new())
|
||||||
* @GDK_WINDOW_OFFSCREEN: offscreen window (see
|
* @GDK_WINDOW_OFFSCREEN: offscreen window (see
|
||||||
* [Offscreen Windows][OFFSCREEN-WINDOWS]). Since 2.18
|
* [Offscreen Windows][OFFSCREEN-WINDOWS]). Since 2.18
|
||||||
|
* @GDK_WINDOW_SUBSURFACE: subsurface-based window; This window is visually
|
||||||
|
* tied to a toplevel, and is moved/stacked with it. Currently this window
|
||||||
|
* type is only implemented in Wayland. Since 3.14
|
||||||
*
|
*
|
||||||
* Describes the kind of window.
|
* Describes the kind of window.
|
||||||
*/
|
*/
|
||||||
@ -78,7 +81,8 @@ typedef enum
|
|||||||
GDK_WINDOW_CHILD,
|
GDK_WINDOW_CHILD,
|
||||||
GDK_WINDOW_TEMP,
|
GDK_WINDOW_TEMP,
|
||||||
GDK_WINDOW_FOREIGN,
|
GDK_WINDOW_FOREIGN,
|
||||||
GDK_WINDOW_OFFSCREEN
|
GDK_WINDOW_OFFSCREEN,
|
||||||
|
GDK_WINDOW_SUBSURFACE
|
||||||
} GdkWindowType;
|
} GdkWindowType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user