From f345051d3671e2321f20aad996f90f57859ae826 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 17 Apr 2013 23:04:05 +0100 Subject: [PATCH] displaymanager: Emit display-opened directly Instead of letting every backend do it manually. --- gdk/broadway/gdkdisplay-broadway.c | 1 - gdk/gdkdisplaymanager.c | 2 ++ gdk/quartz/gdkdisplay-quartz.c | 3 --- gdk/wayland/gdkdisplay-wayland.c | 1 - gdk/win32/gdkdisplay-win32.c | 3 --- gdk/x11/gdkdisplaymanager-x11.c | 2 -- 6 files changed, 2 insertions(+), 10 deletions(-) diff --git a/gdk/broadway/gdkdisplay-broadway.c b/gdk/broadway/gdkdisplay-broadway.c index 7534a9fa07..58c4622cdf 100644 --- a/gdk/broadway/gdkdisplay-broadway.c +++ b/gdk/broadway/gdkdisplay-broadway.c @@ -171,7 +171,6 @@ _gdk_broadway_display_open (const gchar *display_name) } g_signal_emit_by_name (display, "opened"); - g_signal_emit_by_name (gdk_display_manager_get (), "display-opened", display); return display; } diff --git a/gdk/gdkdisplaymanager.c b/gdk/gdkdisplaymanager.c index 95ac309413..063aff2e58 100644 --- a/gdk/gdkdisplaymanager.c +++ b/gdk/gdkdisplaymanager.c @@ -505,6 +505,8 @@ _gdk_display_manager_add_display (GdkDisplayManager *manager, gdk_display_manager_set_default_display (manager, display); manager->displays = g_slist_prepend (manager->displays, display); + + g_signal_emit (manager, signals[DISPLAY_OPENED], 0, display); } /* NB: This function can be called multiple times per display. */ diff --git a/gdk/quartz/gdkdisplay-quartz.c b/gdk/quartz/gdkdisplay-quartz.c index c953131020..17458fc3f5 100644 --- a/gdk/quartz/gdkdisplay-quartz.c +++ b/gdk/quartz/gdkdisplay-quartz.c @@ -136,9 +136,6 @@ _gdk_quartz_display_open (const gchar *display_name) g_signal_emit_by_name (_gdk_display, "opened"); - g_signal_emit_by_name (gdk_display_manager_get (), - "display_opened", _gdk_display); - return _gdk_display; } diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index 06bbf49225..d52d8b85d9 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -246,7 +246,6 @@ _gdk_wayland_display_open (struct wl_display *wl_display) gdk_input_init (display); g_signal_emit_by_name (display, "opened"); - g_signal_emit_by_name (gdk_display_manager_get(), "display_opened", display); return display; } diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c index 58bd064fc1..5d9cb14c60 100644 --- a/gdk/win32/gdkdisplay-win32.c +++ b/gdk/win32/gdkdisplay-win32.c @@ -217,9 +217,6 @@ _gdk_win32_display_open (const gchar *display_name) g_signal_emit_by_name (_gdk_display, "opened"); - g_signal_emit_by_name (gdk_display_manager_get (), - "display_opened", _gdk_display); - GDK_NOTE (MISC, g_print ("... _gdk_display now set up\n")); return _gdk_display; diff --git a/gdk/x11/gdkdisplaymanager-x11.c b/gdk/x11/gdkdisplaymanager-x11.c index 52a2c2baa7..e550983a79 100644 --- a/gdk/x11/gdkdisplaymanager-x11.c +++ b/gdk/x11/gdkdisplaymanager-x11.c @@ -83,8 +83,6 @@ gdk_x11_display_manager_open_display (GdkDisplayManager *manager, { if (gdk_display_manager_get_default_display (manager) == NULL) gdk_display_manager_set_default_display (manager, display); - - g_signal_emit_by_name (manager, "display-opened", display); } return display;