From 732716ba95f02e2613b4f379fd0d8f51f5e8a9a9 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 19 Feb 2020 01:20:19 +0100 Subject: [PATCH] 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)