wayland: Get device directly from clutter in get_grab_info() for touch case
When we call get_grab_info() to get the sequence, device and coordinates for a touch window drag, as the device we use the device from the MetaWaylandPointer, assuming that it's set to the core pointer. In the case where there is no pointer device present on the seat (so no mouse nor touchpad), the wayland pointer remains disabled though, and pointer->device is NULL. This means touch window dragging on hardware without pointer devices present is broken (because MetaWindowDrag assumes that there's a valid device passed in meta_window_drag_begin()). Fix it by taking the core pointer directly from ClutterSeat instead of going the extra detour through MetaWaylandPointer. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3238>
This commit is contained in:
parent
94a39087bc
commit
e5b50d14cf
1 changed files with 5 additions and 1 deletions
|
@ -455,13 +455,17 @@ meta_wayland_seat_get_grab_info (MetaWaylandSeat *seat,
|
|||
if (meta_wayland_seat_has_touch (seat))
|
||||
{
|
||||
ClutterEventSequence *sequence;
|
||||
|
||||
sequence = meta_wayland_touch_find_grab_sequence (seat->touch,
|
||||
surface,
|
||||
serial);
|
||||
if (sequence)
|
||||
{
|
||||
ClutterSeat *clutter_seat =
|
||||
clutter_backend_get_default_seat (clutter_get_default_backend ());
|
||||
|
||||
if (device_out)
|
||||
*device_out = seat->pointer->device;
|
||||
*device_out = clutter_seat_get_pointer (clutter_seat);
|
||||
if (sequence_out)
|
||||
*sequence_out = sequence;
|
||||
|
||||
|
|
Loading…
Reference in a new issue