summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-02-19 21:49:21 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-02-19 21:49:21 +0800
commita1d3e2a8b7b1191c2388063aa59d26375ae05b61 (patch)
tree90551b58461afa6dea7dbca4f5a49ffbce9b843c
parent7400ed95255ec33e6771afa0a0c2e026ab58e2b5 (diff)
downloadcompiz-with-glib-mainloop-a1d3e2a8b7b1191c2388063aa59d26375ae05b61.tar.gz
compiz-with-glib-mainloop-a1d3e2a8b7b1191c2388063aa59d26375ae05b61.tar.bz2
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
-rw-r--r--src/screen.cpp1
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 ());