displaymanager: Emit display-opened directly

Instead of letting every backend do it manually.
This commit is contained in:
Benjamin Otte 2013-04-17 23:04:05 +01:00
parent edbace1045
commit f345051d36
6 changed files with 2 additions and 10 deletions

View File

@ -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;
}

View File

@ -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. */

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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;