gdk: Add a debug key to disable session management

Add

GDK_DISABLE=session-mgmt

to stop GDK from using the Wayland session management protocol.
This commit is contained in:
Matthias Clasen 2024-09-02 12:22:54 -04:00
parent 5f1ec18550
commit 96346f1050
3 changed files with 26 additions and 21 deletions

View File

@ -358,6 +358,9 @@ disable certain features.
`color-mgmt`
: Disable color management
`session-mgmt`
: Disable session management
### `GDK_GL_DISABLE`
This variable can be set to a list of values, which cause GDK to

View File

@ -142,16 +142,17 @@ static const GdkDebugKey gdk_debug_keys[] = {
};
static const GdkDebugKey gdk_feature_keys[] = {
{ "gl", GDK_FEATURE_OPENGL, "Disable OpenGL support" },
{ "gl-api", GDK_FEATURE_GL_API, "Disable non-GLES GL API" },
{ "gles-api", GDK_FEATURE_GLES_API, "Disable GLES GL API" },
{ "egl", GDK_FEATURE_EGL, "Disable EGL" },
{ "glx", GDK_FEATURE_GLX, "Disable GLX" },
{ "wgl", GDK_FEATURE_WGL, "Disable WGL" },
{ "vulkan", GDK_FEATURE_VULKAN, "Disable Vulkan support" },
{ "dmabuf", GDK_FEATURE_DMABUF, "Disable dmabuf support" },
{ "offload", GDK_FEATURE_OFFLOAD, "Disable graphics offload" },
{ "color-mgmt", GDK_FEATURE_COLOR_MANAGEMENT, "Disable color management" },
{ "gl", GDK_FEATURE_OPENGL, "Disable OpenGL support" },
{ "gl-api", GDK_FEATURE_GL_API, "Disable non-GLES GL API" },
{ "gles-api", GDK_FEATURE_GLES_API, "Disable GLES GL API" },
{ "egl", GDK_FEATURE_EGL, "Disable EGL" },
{ "glx", GDK_FEATURE_GLX, "Disable GLX" },
{ "wgl", GDK_FEATURE_WGL, "Disable WGL" },
{ "vulkan", GDK_FEATURE_VULKAN, "Disable Vulkan support" },
{ "dmabuf", GDK_FEATURE_DMABUF, "Disable dmabuf support" },
{ "offload", GDK_FEATURE_OFFLOAD, "Disable graphics offload" },
{ "color-mgmt", GDK_FEATURE_COLOR_MANAGEMENT, "Disable color management" },
{ "session-mgmt", GDK_FEATURE_SESSION_MANAGEMENT, "Disable session management" },
};

View File

@ -54,19 +54,20 @@ typedef enum {
} GdkDebugFlags;
typedef enum {
GDK_FEATURE_OPENGL = 1 << 0,
GDK_FEATURE_GL_API = 1 << 1,
GDK_FEATURE_GLES_API = 1 << 2,
GDK_FEATURE_EGL = 1 << 3,
GDK_FEATURE_GLX = 1 << 4,
GDK_FEATURE_WGL = 1 << 5,
GDK_FEATURE_VULKAN = 1 << 6,
GDK_FEATURE_DMABUF = 1 << 7,
GDK_FEATURE_OFFLOAD = 1 << 8,
GDK_FEATURE_COLOR_MANAGEMENT = 1 << 9,
GDK_FEATURE_OPENGL = 1 << 0,
GDK_FEATURE_GL_API = 1 << 1,
GDK_FEATURE_GLES_API = 1 << 2,
GDK_FEATURE_EGL = 1 << 3,
GDK_FEATURE_GLX = 1 << 4,
GDK_FEATURE_WGL = 1 << 5,
GDK_FEATURE_VULKAN = 1 << 6,
GDK_FEATURE_DMABUF = 1 << 7,
GDK_FEATURE_OFFLOAD = 1 << 8,
GDK_FEATURE_COLOR_MANAGEMENT = 1 << 9,
GDK_FEATURE_SESSION_MANAGEMENT = 1 << 10,
} GdkFeatures;
#define GDK_ALL_FEATURES ((1 << 10) - 1)
#define GDK_ALL_FEATURES ((1 << 11) - 1)
extern guint _gdk_debug_flags;