Linux: call window resizes instead of moving on a touch drag #82

Open
opened 2026-11-04 01:08:15 +00:00 by asxpi · 1 comment
Member

On a Linux touch screen, the call window cannot be moved with a finger; a touch drag resizes it instead. It moves fine with the mouse. Seen on 0.7.20 (Flatpak, X11).

Cause (on develop 958e4dca too):

  • The call window's tile drag calls Tauri's getCurrentWindow().startDragging() (ui/src/state/call-window.ts:638). tao's move follows the pointer, not a touch, so the move never starts for a finger.
  • The touch-aware move made for the main window (window_frame.rs on_touch / touch_move, begin_move_drag_for_device with the touch's device and serial, #7 #9) and its touch resize edges look up MAIN_WINDOW only (src-tauri/src/window_frame.rs:1110-1205). The call window never gets the touch move, while the page-side resize edges from installWindowFrame still react.

Fix: make on_touch/touch_move/begin_resize work per window (take the label), hook them on the call windows, and have CallWindowPage.drag() use window_touch_move when the press is a touch (pointerType === 'touch'), as views/empty-space.ts does for the main window. The same likely applies to the console and page windows.

On a Linux touch screen, the call window cannot be moved with a finger; a touch drag resizes it instead. It moves fine with the mouse. Seen on 0.7.20 (Flatpak, X11). Cause (on `develop` 958e4dca too): - The call window's tile drag calls Tauri's `getCurrentWindow().startDragging()` (`ui/src/state/call-window.ts:638`). tao's move follows the pointer, not a touch, so the move never starts for a finger. - The touch-aware move made for the main window (`window_frame.rs` `on_touch` / `touch_move`, `begin_move_drag_for_device` with the touch's device and serial, #7 #9) and its touch resize edges look up `MAIN_WINDOW` only (`src-tauri/src/window_frame.rs:1110-1205`). The call window never gets the touch move, while the page-side resize edges from `installWindowFrame` still react. Fix: make `on_touch`/`touch_move`/`begin_resize` work per window (take the label), hook them on the call windows, and have `CallWindowPage.drag()` use `window_touch_move` when the press is a touch (`pointerType === 'touch'`), as `views/empty-space.ts` does for the main window. The same likely applies to the console and page windows.
ann referenced this issue from a commit 2026-11-04 01:51:49 +00:00
A call window and an XML console window take their own touches on Linux, as the main window does (forge #82: "On a Linux touch screen, the call window cannot be moved with a finger; a touch drag resizes it instead", 0.7.20, Flatpak, X11). The touch move and the touch resize edges of #7 and #9 (window_frame.rs on_touch, touch_move, begin_resize) looked up the main window alone, so on a call window -- undecorated where the page draws the title bar, and as the tile -- tao's and tauri-runtime-wry's own touch handlers stayed: they start a resize on every touch event within 5px of an undecorated window's border, the moves of a dragging finger included, while tao's move (startDragging) follows the pointer and never starts for a finger. Now the handlers are hooked per window (touch_window, from call_window.rs and console_window.rs as each window is made, on the main thread), each window keeps its own first finger, begin_resize resizes the window the touch is on (only one without the system's frame that can be resized, so never the tile), with its edges at its border (frame_logic::touch_frame: only the main window has the drawn frame's shadow), and window_touch_move moves the window that asks; the call and console capabilities grant it. Windows, macOS and Android are unchanged (the command does nothing there, as before). Tests: frame_logic's touch_frame case; app_tests' call_windows touches the call window's edge and middle (the edge the resize's where it is bare, the middle the page's), then the tile's (both the page's), and asks the touch move from the call window.
ann referenced this issue from a commit 2026-11-04 03:26:08 +00:00
0.8.0-beta4, on libtacky v1.2.0-beta4 (9309bf43), pairing with tackygram 0.4.0-beta3: develop as it stands on b030d265, 0.8.0-beta3 with Signal's reactions and disappearing-message timer (0f0af21f), the network badge in the status dot's place with no ring and one switch for both (661881e2, e857c166, 0e2bf88a), the chat list's tags button (958e4dca), a notice never naming a chat "jid (jid)" (1e5f5623), the call window moving on a touch drag (lane B, forge #82), the Camera in an audio call and Share screen on the page's engine (lane D) and on the native one (lane D2, b9e16b10; #80, #81), a room's Android notice opening the room (lane E), the smoke following two of those (13942223) and the libtacky pin (b030d265), made a beta: version 0.8.0-beta4 in the UI package and its lock, tauri.conf.json, Cargo.toml and Cargo.lock and the README's version line, Android versionCode 8003; a compact 0.8.0-beta4 CHANGELOG entry (Chats, Calls, Android, Linux); the metainfo's development release 0.8.0~beta4 (appstreamcli validate --no-net passes). docs/macos.md stays at the last Mac release. README's tables measured again on this tree: 109,389 lines of code and 113,153 of tests (the change since 0.8.0-beta3 counted by the same rules), the UI's 65,128 of 66,497 lines (97.9%, 90.7% of branches), the shell's 12,441 of 13,135 source lines (94.7%, emsdk's LLVM tools), the Kotlin's 4,412 of 4,678 (94.3%), the worker's 872 of 872. Gates on this tree: make check STRICT=1 clean (2,352 strings in all five catalogues, "Unmute" obsolete; check-macos clean); make test-ui 4,960 passed, 8 skipped (426 files); make test-shell 442 in 55 modules; make test-worker green; make release-check passed (10 allowed warnings, no advisory); the Android JVM tests free 621 and gms 624 passed; make coverage-shell-all 474 library tests and the glue; the WebKit smoke 862 screens, 8,882 checks, 0 failed with SMOKE_JOBS=16; cargo check of the shell for x86_64-pc-windows-gnu clean.
Owner

Thanks for tracking this down. On Linux, the touch handling made for the main window (#7, #9) was attached only to the main window. The call window draws its own title bar, so it has no system frame, and Tauri's built-in touch handlers stayed active on it. Those handlers start a resize whenever a finger comes within 5px of the border, including while it is dragging. Meanwhile, the tile's move (startDragging) follows the mouse pointer and never starts for a finger. Now every call window (and XML console window) gets the same per-window touch handling as the main window. A finger dragging the tile or the header bar moves that window through the touch's own device. A finger on an edge resizes the window once, and only a window that can be resized, so never the tile. The mouse works as before, and nothing changes on Windows, macOS or Android. Released in another.im 0.8.0-beta4 (forge page "another.im 0.8", all platforms but Mac) on libtacky 1.2.0-beta4. Please check it with a finger on both X11 and Wayland: drag the tile, tap it to restore, drag the call window's header, and resize from an edge.

Thanks for tracking this down. On Linux, the touch handling made for the main window (#7, #9) was attached only to the main window. The call window draws its own title bar, so it has no system frame, and Tauri's built-in touch handlers stayed active on it. Those handlers start a resize whenever a finger comes within 5px of the border, including while it is dragging. Meanwhile, the tile's move (startDragging) follows the mouse pointer and never starts for a finger. Now every call window (and XML console window) gets the same per-window touch handling as the main window. A finger dragging the tile or the header bar moves that window through the touch's own device. A finger on an edge resizes the window once, and only a window that can be resized, so never the tile. The mouse works as before, and nothing changes on Windows, macOS or Android. Released in another.im 0.8.0-beta4 (forge page "another.im 0.8", all platforms but Mac) on libtacky 1.2.0-beta4. Please check it with a finger on both X11 and Wayland: drag the tile, tap it to restore, drag the call window's header, and resize from an edge.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
another-im/anotherim-js#82
No description provided.