[gtk: 1/2] gtk_init: Fix debug flags handling when a display is already open
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] gtk_init: Fix debug flags handling when a display is already open
- Date: Mon, 19 Feb 2018 18:36:20 +0000 (UTC)
commit 8ad81a35e1e5d72b50e93adcead9def4a083f6e0
Author: Christoph Reiter <creiter src gnome org>
Date: Sun Feb 18 10:34:52 2018 +0100
gtk_init: Fix debug flags handling when a display is already open
The code assigning the display to the debug_flags struct gets only
called when the default display changes, which never happens
when there already is one.
This makes it call the change callback in case a display is already
there.
The same fix was applied to gtk3 in !26 where calling gdk_init()
before gtk_init() would trigger this case. With gdk_init() gone
in master this is less likely to happen, but still possible
if gdk_display_open() is called before gtk_init().
See https://gitlab.gnome.org/GNOME/pygobject/issues/166
gtk/gtkmain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 2f1ee97b9f..0508754dd0 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -662,7 +662,7 @@ do_post_parse_initialization (void)
display_manager = gdk_display_manager_get ();
if (gdk_display_manager_get_default_display (display_manager) != NULL)
- _gtk_accessibility_init ();
+ default_display_notify_cb (display_manager);
g_signal_connect (display_manager, "notify::default-display",
G_CALLBACK (default_display_notify_cb),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]