gdk: Make GDK_DEBUG=default-settings unconditional

Our tests use this settings, so we should respect it
in non-debug builds as well.
This commit is contained in:
Matthias Clasen 2021-08-30 11:01:55 -04:00
parent 733fb527fa
commit a4f067481c
3 changed files with 5 additions and 5 deletions

View File

@ -132,7 +132,7 @@ static const GdkDebugKey gdk_debug_keys[] = {
{ "gl-wgl", GDK_DEBUG_GL_WGL, "Use WGL on Windows" },
{ "vulkan-disable", GDK_DEBUG_VULKAN_DISABLE, "Disable Vulkan support" },
{ "vulkan-validate", GDK_DEBUG_VULKAN_VALIDATE, "Load the Vulkan validation layer" },
{ "default-settings",GDK_DEBUG_DEFAULT_SETTINGS, "Force default values for xsettings" },
{ "default-settings",GDK_DEBUG_DEFAULT_SETTINGS, "Force default values for xsettings", TRUE },
};

View File

@ -2117,7 +2117,7 @@ gdk_wayland_display_get_setting (GdkDisplay *display,
{
TranslationEntry *entry;
if (GDK_DISPLAY_DEBUG_CHECK (display, DEFAULT_SETTINGS))
if (gdk_display_get_debug_flags (display) & GDK_DEBUG_DEFAULT_SETTINGS)
return FALSE;
if (GDK_WAYLAND_DISPLAY (display)->settings != NULL &&

View File

@ -89,7 +89,7 @@ get_boolean_default (GdkX11Screen *x11_screen,
char *v;
int i;
if (GDK_DISPLAY_DEBUG_CHECK (GDK_SCREEN_DISPLAY (x11_screen), DEFAULT_SETTINGS))
if (gdk_display_get_debug_flags (GDK_SCREEN_DISPLAY (x11_screen)) & GDK_DEBUG_DEFAULT_SETTINGS)
return FALSE;
v = XGetDefault (dpy, "Xft", option);
@ -114,7 +114,7 @@ get_double_default (GdkX11Screen *x11_screen,
Display *dpy = GDK_SCREEN_XDISPLAY (x11_screen);
char *v, *e;
if (GDK_DISPLAY_DEBUG_CHECK (GDK_SCREEN_DISPLAY (x11_screen), DEFAULT_SETTINGS))
if (gdk_display_get_debug_flags (GDK_SCREEN_DISPLAY (x11_screen)) & GDK_DEBUG_DEFAULT_SETTINGS)
return FALSE;
v = XGetDefault (dpy, "Xft", option);
@ -141,7 +141,7 @@ get_integer_default (GdkX11Screen *x11_screen,
Display *dpy = GDK_SCREEN_XDISPLAY (x11_screen);
char *v, *e;
if (GDK_DISPLAY_DEBUG_CHECK (GDK_SCREEN_DISPLAY (x11_screen), DEFAULT_SETTINGS))
if (gdk_display_get_debug_flags (GDK_SCREEN_DISPLAY (x11_screen)) & GDK_DEBUG_DEFAULT_SETTINGS)
return FALSE;
v = XGetDefault (dpy, "Xft", option);