[clutter/clutter-1.20] xi2: XSync before getting the client pointer on construction



commit 591d31c970e1e00c53812de2c24bef6546bcf6ae
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Aug 25 16:14:38 2014 +0200

    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

 clutter/x11/clutter-device-manager-xi2.c |    1 +
 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 5eb64c0..aef0bd6 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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]