After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 756748 - Shell touch interaction fixes for wayland
Shell touch interaction fixes for wayland
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on: 756754
Blocks:
 
 
Reported: 2015-10-17 14:24 UTC by Carlos Garnacho
Modified: 2015-12-04 11:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
workspacesView: Return from overview when tapping on an empty workspace (1.18 KB, patch)
2015-10-17 14:27 UTC, Carlos Garnacho
committed Details | Review
popupMenu: Fix touch handling of PopupSubMenuMenuItem (1.26 KB, patch)
2015-10-17 14:27 UTC, Carlos Garnacho
committed Details | Review
workspaceThumbnail: Enable activation of window clones on touch (1.51 KB, patch)
2015-10-17 14:27 UTC, Carlos Garnacho
committed Details | Review
workspaceThumbnail: Enable activation of thumbnails in the WorkspaceBox (2.40 KB, patch)
2015-10-17 14:28 UTC, Carlos Garnacho
committed Details | Review
dnd: Implement touch event support (6.60 KB, patch)
2015-10-17 14:28 UTC, Carlos Garnacho
committed Details | Review
workspace: Keep track of the dragging touch sequence (1.60 KB, patch)
2015-10-17 14:28 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2015-10-17 14:24:42 UTC
There's still a few places along the shell where we rely on pointer emulation to get the right behavior on touch devices. I'm attaching a few patches that fix all the places I've seen, these make touch interaction on the shell on wayland on par with x11.
Comment 1 Carlos Garnacho 2015-10-17 14:27:41 UTC
Created attachment 313532 [details] [review]
workspacesView: Return from overview when tapping on an empty workspace

This works for pointers and touch on X11, there is however no pointer
emulation on evdev, so touch triggers ::clicked with button==0 which
is ignored.
Comment 2 Carlos Garnacho 2015-10-17 14:27:53 UTC
Created attachment 313533 [details] [review]
popupMenu: Fix touch handling of PopupSubMenuMenuItem

It overrides ::button-release-event in order to implement the
hidden/shown toggling, it must do the same on TOUCH_END, otherwise
menus stay shown on touch.
Comment 3 Carlos Garnacho 2015-10-17 14:27:58 UTC
Created attachment 313534 [details] [review]
workspaceThumbnail: Enable activation of window clones on touch

We must handle the TOUCH_END event separately for the evdev input
backend.
Comment 4 Carlos Garnacho 2015-10-17 14:28:04 UTC
Created attachment 313535 [details] [review]
workspaceThumbnail: Enable activation of thumbnails in the WorkspaceBox

We need a separate handler for TOUCH_BEGIN/END events.
Comment 5 Carlos Garnacho 2015-10-17 14:28:10 UTC
Created attachment 313536 [details] [review]
dnd: Implement touch event support

We need to keep track of the pointer emulating touch sequence. In order
to have events properly redirected on touch devices, the
Clutter.grab_pointer and ungrab_pointer() have been replaced by the grab()
and grab_sequence() ClutterInputDevice methods, one or the other is used
depending on the device triggering DnD.

An extra "sequence" argument has been added to startDrag, passing null here
will resort to pointer grabs.

This is enough to make thumbnails in the WorkspaceBox draggable through
touch.
Comment 6 Carlos Garnacho 2015-10-17 14:28:17 UTC
Created attachment 313537 [details] [review]
workspace: Keep track of the dragging touch sequence

draggable.startDrag() is called directly here (eg. manualMode is not set),
we must keep track of the touch event and pass it to startDrag() then.
Comment 7 Carlos Garnacho 2015-12-04 11:35:19 UTC
Attachment 313532 [details] pushed as ffa8c2f - workspacesView: Return from overview when tapping on an empty workspace
Attachment 313533 [details] pushed as 67afd7a - popupMenu: Fix touch handling of PopupSubMenuMenuItem
Attachment 313534 [details] pushed as 06f7854 - workspaceThumbnail: Enable activation of window clones on touch
Attachment 313535 [details] pushed as c0b50cb - workspaceThumbnail: Enable activation of thumbnails in the WorkspaceBox
Attachment 313536 [details] pushed as 508a13a - dnd: Implement touch event support
Attachment 313537 [details] pushed as 9d203dd - workspace: Keep track of the dragging touch sequence