main: Check if any debug flags are set in gtk_get_debug_flags()

We end up checking the debug flags for the default display, but that's
unnecessary if we know that no display has any debug flags set anyway.
This commit is contained in:
Timm Bäder 2019-05-25 17:38:26 +02:00
parent d98e05b91a
commit e3f1a3d27c

View File

@ -740,7 +740,10 @@ gtk_set_display_debug_flags (GdkDisplay *display,
guint
gtk_get_debug_flags (void)
{
if (gtk_get_any_display_debug_flag_set ())
return gtk_get_display_debug_flags (gdk_display_get_default ());
return 0;
}
/**