diff options
-rw-r--r-- | libmate-panel-applet/mate-panel-applet-factory.c | 2 | ||||
-rw-r--r-- | mate-panel/panel-multiscreen.c | 29 | ||||
-rw-r--r-- | mate-panel/panel-profile.c | 5 |
3 files changed, 16 insertions, 20 deletions
diff --git a/libmate-panel-applet/mate-panel-applet-factory.c b/libmate-panel-applet/mate-panel-applet-factory.c index 6301a11c..82d256ac 100644 --- a/libmate-panel-applet/mate-panel-applet-factory.c +++ b/libmate-panel-applet/mate-panel-applet-factory.c @@ -161,7 +161,7 @@ mate_panel_applet_factory_get_applet (MatePanelAppletFactory *factory, g_variant_unref (props); screen = screen_num != -1 ? - gdk_display_get_screen (gdk_display_get_default (), screen_num) : + gdk_display_get_default_screen (gdk_display_get_default ()) : gdk_screen_get_default (); xid = mate_panel_applet_get_xid (MATE_PANEL_APPLET (applet), screen); diff --git a/mate-panel/panel-multiscreen.c b/mate-panel/panel-multiscreen.c index 7c6df59f..afe8c24e 100644 --- a/mate-panel/panel-multiscreen.c +++ b/mate-panel/panel-multiscreen.c @@ -404,7 +404,6 @@ void panel_multiscreen_init (void) { GdkDisplay *display; - int i; if (initialized) return; @@ -417,24 +416,22 @@ panel_multiscreen_init (void) monitors = g_new0 (int, screens); geometries = g_new0 (GdkRectangle *, screens); - for (i = 0; i < screens; i++) { - GdkScreen *screen; + GdkScreen *screen; - screen = gdk_display_get_screen (display, i); + screen = gdk_display_get_default_screen (display); - /* We connect to both signals to be on the safe side, but in - * theory, it should be enough to only connect to - * monitors-changed. Since we'll likely get two signals, we do - * the real callback in the idle loop. */ - g_signal_connect (screen, "size-changed", - G_CALLBACK (panel_multiscreen_queue_reinit), NULL); - g_signal_connect (screen, "monitors-changed", - G_CALLBACK (panel_multiscreen_queue_reinit), NULL); + /* We connect to both signals to be on the safe side, but in + * theory, it should be enough to only connect to + * monitors-changed. Since we'll likely get two signals, we do + * the real callback in the idle loop. */ + g_signal_connect (screen, "size-changed", + G_CALLBACK (panel_multiscreen_queue_reinit), NULL); + g_signal_connect (screen, "monitors-changed", + G_CALLBACK (panel_multiscreen_queue_reinit), NULL); - panel_multiscreen_get_monitors_for_screen (screen, - &(monitors[i]), - &(geometries[i])); - } + panel_multiscreen_get_monitors_for_screen (screen, + &(monitors[0]), + &(geometries[0])); initialized = TRUE; } diff --git a/mate-panel/panel-profile.c b/mate-panel/panel-profile.c index 7f5aea06..41e1dba6 100644 --- a/mate-panel/panel-profile.c +++ b/mate-panel/panel-profile.c @@ -775,9 +775,8 @@ panel_profile_toplevel_change_notify (GSettings *settings, if (!strcmp (key, "screen")) { GdkScreen *screen; - screen = gdk_display_get_screen ( - gdk_display_get_default (), - g_settings_get_int (settings, key)); + screen = gdk_display_get_default_screen (gdk_display_get_default ()); + if (screen) gtk_window_set_screen (GTK_WINDOW (toplevel), screen); else |