The window cannot be moved by touch #9
Labels
No labels
bug
duplicate
feature request
linux
macos
needsinfo
severity: high
severity: low
severity: medium
telegram_gw
ui/ux
windows
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
another-im/anotherim-js#9
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On Linux with the app's own title bar, the window cannot be moved with a finger on a touchscreen: dragging the header bar by touch does nothing. With a mouse it moves as expected. Seen on GNOME (Wayland, mutter 50.2) with the 0.4.7 Flatpak built from
fix/touch-resize(#8); nothing in that branch touches the move path, so it is most likely the same in every build.Why
Two things are missing, either one enough to stop it:
ui/src/views/window-drag.tsstarts a move onmousedownfollowed by amousemovewith the button held past 4px. WebKitGTK sends no mouse events while a finger drags; it only synthesizes a click when the finger lifts. Soframe.startDragging()is never called. A Wayland log of a test session shows noxdg_toplevel.moveafter any touch, and one after every mouse drag.startDragging()ends in tao 0.35.3'sWindowRequest::DragWindow(src/platform_impl/linux/event_loop.rs:336), which callsbegin_move_drag(1, x, y, 0)on the seat's pointer device. Started during a touch, GTK would send the move with a mouse serial, and the compositor would refuse it.What a fix needs
pointerType === 'touch'(pointerdown, thenpointermovepast the threshold) on thedata-window-dragregions, alongside the mouse path.gdk_window_begin_move_drag_for_device()with the device and position of the touch in progress, so the request carries the live touch's serial. Exactly one request per touch.Careful with mutter
Until mutter has a NULL check in
touch_can_grab_surface()(#7), a second move or resize request carrying the serial of a touch that mutter has already cancelled crashes GNOME Shell, and starting a move is what makes mutter cancel the touch. So the shell side must send the request once per touch and never repeat it, and it is best tested on a patched mutter first.Also seen
With the touch-resize handlers blocked (#8), every finger lift still makes tao's
button-presshandler (event_loop.rs:521) answer GTK's emulated click withxdg_toplevel.resize(seat, 0 or a stale mouse serial, 1), a top-edge resize. The compositor refuses it and it carries no touch serial, so it is harmless, but it is noise worth reporting to tao along with its touch resizing.