[gnome-shell/wip/carlosg/clutter-seat: 81/88] 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: 81/88] shell: Use ClutterSeat to get pointer device
- Date: Wed, 29 Jan 2020 11:24:37 +0000 (UTC)
commit 465b166a1f529e0a6bfee3579e8f545e80c4aac1
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 f3845277c3..2be2051f14 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -1333,9 +1333,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;
@@ -1344,8 +1347,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]