shell: Use ClutterSeat to get pointer device
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/760
This commit is contained in:
parent
0f4aeb2654
commit
bd48b0641f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user