summaryrefslogtreecommitdiff
path: root/plugins/xsettings
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/xsettings')
-rw-r--r--plugins/xsettings/msd-xsettings-manager.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/plugins/xsettings/msd-xsettings-manager.c b/plugins/xsettings/msd-xsettings-manager.c
index b88e71f..e7849ec 100644
--- a/plugins/xsettings/msd-xsettings-manager.c
+++ b/plugins/xsettings/msd-xsettings-manager.c
@@ -643,13 +643,10 @@ static gboolean
setup_xsettings_managers (MateXSettingsManager *manager)
{
GdkDisplay *display;
- int i;
- int n_screens;
gboolean res;
gboolean terminated;
display = gdk_display_get_default ();
- n_screens = gdk_display_get_n_screens (display);
res = xsettings_manager_check_running (gdk_x11_display_get_xdisplay (display),
gdk_x11_screen_get_screen_number (gdk_screen_get_default ()));
@@ -658,22 +655,21 @@ setup_xsettings_managers (MateXSettingsManager *manager)
return FALSE;
}
- manager->priv->managers = g_new0 (XSettingsManager *, n_screens + 1);
+ manager->priv->managers = g_new0 (XSettingsManager *, 2);
terminated = FALSE;
- for (i = 0; i < n_screens; i++) {
- GdkScreen *screen;
-
- screen = gdk_display_get_screen (display, i);
-
- manager->priv->managers [i] = xsettings_manager_new (gdk_x11_display_get_xdisplay (display),
- gdk_x11_screen_get_screen_number (screen),
- terminate_cb,
- &terminated);
- if (! manager->priv->managers [i]) {
- g_warning ("Could not create xsettings manager for screen %d!", i);
- return FALSE;
- }
+
+ GdkScreen *screen;
+
+ screen = gdk_display_get_default_screen (display);
+
+ manager->priv->managers [0] = xsettings_manager_new (gdk_x11_display_get_xdisplay (display),
+ gdk_x11_screen_get_screen_number (screen),
+ terminate_cb,
+ &terminated);
+ if (! manager->priv->managers [0]) {
+ g_warning ("Could not create xsettings manager for screen!");
+ return FALSE;
}
return TRUE;