[gnome-shell/wip/carlosg/clutter-seat: 1/9] shell: Use ClutterSeat to	get pointer device
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gnome-shell/wip/carlosg/clutter-seat: 1/9] shell: Use ClutterSeat to	get pointer device
- Date: Mon, 14 Oct 2019 08:13:09 +0000 (UTC)
commit fdb564d74eb1e04de0697f097d7d17ffeb1ad4d7
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Oct 5 12:32:03 2019 +0200
    shell: Use ClutterSeat to get pointer device
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/760
 src/shell-global.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/shell-global.c b/src/shell-global.c
index 77e167c107..e887aabbd4 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -1236,9 +1236,12 @@ shell_global_sync_pointer (ShellGlobal *global)
   int x, y;
   ClutterModifierType mods;
   ClutterMotionEvent event;
+  ClutterSeat *seat;
 
   shell_global_get_pointer (global, &x, &y, &mods);
 
+  seat = clutter_backend_get_default_seat (clutter_get_default_backend ());
+
   event.type = CLUTTER_MOTION;
   event.time = shell_global_get_current_time (global);
   event.flags = CLUTTER_EVENT_FLAG_SYNTHETIC;
@@ -1247,8 +1250,7 @@ shell_global_sync_pointer (ShellGlobal *global)
   event.y = y;
   event.modifier_state = mods;
   event.axes = NULL;
-  event.device = clutter_device_manager_get_device (clutter_device_manager_get_default (),
-                                                    META_VIRTUAL_CORE_POINTER_ID);
+  event.device = clutter_seat_get_pointer (seat);
 
   /* Leaving event.source NULL will force clutter to look it up, which
    * will generate enter/leave events as a side effect, if they are
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]