[gtk/wip/otte/for-master] debug: When debug-printing, treat NULL as the default display



commit 732716ba95f02e2613b4f379fd0d8f51f5e8a9a9
Author: Benjamin Otte <otte redhat com>
Date:   Wed Feb 19 01:20:19 2020 +0100

    debug: When debug-printing, treat NULL as the default display
    
    Otherwise we lose debug prints from all code that allows NULL displays.

 gtk/gtkmain.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 631c308e2d..394cd04232 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -687,6 +687,9 @@ gtk_get_display_debug_flags (GdkDisplay *display)
 {
   gint i;
 
+  if (display == NULL)
+    display = gdk_display_get_default ();
+
   for (i = 0; i < N_DEBUG_DISPLAYS; i++)
     {
       if (debug_flags[i].display == display)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]