summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2014-08-25 16:14:38 +0200
committerCarlos Garnacho <carlosg@gnome.org>2014-08-25 16:51:31 +0200
commit591d31c970e1e00c53812de2c24bef6546bcf6ae (patch)
tree3caae76fbad213a28710c02dd7fb6855984665b7
parentcfcba1868487fc02c9fa3e6e1d24ae69239b596b (diff)
downloadclutter-591d31c970e1e00c53812de2c24bef6546bcf6ae.tar.gz
xi2: XSync before getting the client pointer on construction
If the device manager is created and queried for the client pointer at a very early stage in application lifetime, the device_id returned would be 0 as the server hasn't apparently decided yet about the client pointer. For these situations, doing XSync prior to fetching the client pointer gets the server to device about the client pointer before we query it. https://bugzilla.gnome.org/show_bug.cgi?id=735388
-rw-r--r--clutter/x11/clutter-device-manager-xi2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/clutter/x11/clutter-device-manager-xi2.c b/clutter/x11/clutter-device-manager-xi2.c
index 5eb64c06d..aef0bd666 100644
--- a/clutter/x11/clutter-device-manager-xi2.c
+++ b/clutter/x11/clutter-device-manager-xi2.c
@@ -1499,6 +1499,7 @@ clutter_device_manager_xi2_constructed (GObject *gobject)
clutter_x11_get_root_window (),
&event_mask);
+ XSync (backend_x11->xdpy, False);
update_client_pointer (manager_xi2);
if (G_OBJECT_CLASS (clutter_device_manager_xi2_parent_class)->constructed)