diff options
authorSam Spilsbury <>2011-02-19 21:49:21 +0800
committerSam Spilsbury <>2011-02-19 21:49:21 +0800
commita1d3e2a8b7b1191c2388063aa59d26375ae05b61 (patch)
parent7400ed95255ec33e6771afa0a0c2e026ab58e2b5 (diff)
Sync after ungrabbing the server.
Turns out that XUngrabServer is not a synchronous call, so there is a race condition with the new startup order where the ungrab server request will sit in the output buffer waiting to be processed and the server won't actually be ungrabbed when we start loading plugins. This can have all kinds of side effects, for example when initializing GConf with GDBus, there will be a call to dbus-launch --autostart to try and get the session bus ID which will fail if there is still a server grab that hasn't been released (since it attempts to read X11 properties) Fixes LP: #691561
1 files changed, 1 insertions, 0 deletions
diff --git a/src/screen.cpp b/src/screen.cpp
index eae037a..8c93249 100644
--- a/src/screen.cpp
+++ b/src/screen.cpp
@@ -4570,6 +4570,7 @@ CompScreen::init (const char *name)
XDefineCursor (dpy, priv->root, priv->normalCursor);
XUngrabServer (dpy);
+ XSync (dpy, FALSE);
priv->setAudibleBell (priv->optionGetAudibleBell ());