[gnome-settings-daemon] xsettings: Try a few times to start the xsettings manager
- From: Rodrigo Moya <rodrigo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] xsettings: Try a few times to start the xsettings manager
- Date: Thu, 31 Mar 2011 16:01:50 +0000 (UTC)
commit e01f192a737bfdcf3893274b78a587734ba4bb00
Author: Rodrigo Moya <rodrigo gnome-db org>
Date: Tue Mar 29 10:22:39 2011 +0200
xsettings: Try a few times to start the xsettings manager
This is to avoid race conditions on very fast machines, where the gdm's
gnome-settings-daemon might already be running before starting the user's
one
https://bugzilla.gnome.org/show_bug.cgi?id=634988
plugins/xsettings/gsd-xsettings-manager.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/plugins/xsettings/gsd-xsettings-manager.c b/plugins/xsettings/gsd-xsettings-manager.c
index 709d9f8..fdad93c 100644
--- a/plugins/xsettings/gsd-xsettings-manager.c
+++ b/plugins/xsettings/gsd-xsettings-manager.c
@@ -583,12 +583,20 @@ setup_xsettings_managers (GnomeXSettingsManager *manager)
int n_screens;
gboolean res;
gboolean terminated;
+ gint tries = 0;
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_screen_get_number (gdk_screen_get_default ()));
+ do {
+ res = xsettings_manager_check_running (gdk_x11_display_get_xdisplay (display),
+ gdk_screen_get_number (gdk_screen_get_default ()));
+ if (res) {
+ g_usleep (100000);
+ tries++;
+ }
+ } while (res && tries <= 20);
+
if (res) {
g_warning ("You can only run one xsettings manager at a time; exiting");
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]