summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2013-04-17 22:56:22 +0100
committerBenjamin Otte <otte@redhat.com>2013-04-19 16:18:25 -0400
commit01c6ecfb78bb36ec9ab65a30a5f9c25e4ba71bc3 (patch)
treec0c3029c157de5776a2e0db22f114a207d66f7a4
parentc86ac95ebf53e0d132bcb87c19303c2e645c1488 (diff)
downloadgtk+-01c6ecfb78bb36ec9ab65a30a5f9c25e4ba71bc3.tar.gz
display: Add display to displaymanager later
Instead of GdkDisplay::init, only add the display to the display manager in GdkDisplay::opened. This avoids spurious changes of the default display in gtk_init() when we're trying to find the one that works and try to open lots of different ones.
-rw-r--r--gdk/gdkdisplay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index d8fe13e1d6..1c14d3e617 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -108,6 +108,8 @@ gdk_display_real_opened (GdkDisplay *display)
g_signal_connect (device_manager, "device-removed",
G_CALLBACK (device_removed_cb), display);
+
+ _gdk_display_manager_add_display (gdk_display_manager_get (), display);
}
static void
@@ -206,8 +208,6 @@ gdk_display_init (GdkDisplay *display)
display->multiple_click_info = g_hash_table_new_full (NULL, NULL, NULL,
(GDestroyNotify) g_free);
-
- _gdk_display_manager_add_display (gdk_display_manager_get (), display);
}
static void