GNOME Bugzilla – Bug 756748
Shell touch interaction fixes for wayland
Last modified: 2015-12-04 11:35:48 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.
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.
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.
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.
Created attachment 313535 [details] [review] workspaceThumbnail: Enable activation of thumbnails in the WorkspaceBox We need a separate handler for TOUCH_BEGIN/END events.
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.
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.
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