Repository navigation
qt: a held finger is a right-click; every right-click menu answers it - #2129
Merged
Merged
Conversation
FingerPress (toad/qt/finger_press.py) classifies each press once, at its QWindow, through the shared toad.pointer_gesture states, which now include a hold (GestureControl.held, Gesture.held, HELD / UNANSWERED_HOLD, Gesture.takes_pointer). The thresholds are the platform's startDragDistance and mousePressAndHoldInterval: - tapped(Press): released before a drag or a hold, emitted before the release reaches the widget; Press.claim() ends the press without the widget's click. - long_pressed(Press): a finger held still. The widget under it gets the QContextMenuEvent a right button sends, and it accepted the event. The rest of the press is swallowed and the release cancelled. - drag_started(Press): moved past the drag distance; the moves stay the widget's. This replaces the history's and the welcome tree's TapAndHoldGesture copies, SwallowsRelease, and the history's press/release tap check (its link taps now consume tapped). It also adds the qt_drive `hold` scenario (work in progress). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3
…ms rows get theirs - FingerPress no longer replaces the window's release. A held or claimed press's release passes through the window, so Qt's own pointer record stays true; only the widget it reaches gets it far off itself (no click, its press ends). Replacing the window's release had left Qt routing the next right-click to the top-level window, so no menu opened. A held press's moves are kept from the widget the same way. - HeldRowMenu serves any tree of conversation rows. The app's sidebar gets its row menu (Open / Copy name) on a right-click or a hold, as every Textual sidebar row has one; on main only the welcome's rows had it. - The thread pane's Comms rows open on a tap and offer Open / Copy on a right-click or a hold, as Textual's RelationshipRow does. entry_target moves to the shared toad.client.relationship_row_menu, so both frontends open a relationship the same way. - qt_drive `hold`: real touch through the window (each commit made from a Qt timer slot, outside the scenario's task), the phone's touch-as-mouse gesture, and a mouse right-click through the window to compare against. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tristan, on Android: "long press on items that can be right clicked should do right click."
Built by the long-press fork before the weekly limit stopped it. I rebased it onto main, resolved two import-only conflicts in
tools/qt_drive.py, and ran the gates on the rebased head.Change
toad/qt/finger_press.py: one application-level classifier decides what a press is (a tap, a held finger, or the start of a drag), using the sharedtoad.pointer_gesturestates with the platform's drag distance and press-and-hold interval.QContextMenuEventa right button would send, so every context menu answers a held finger with no code of its own.Gates (on aa5c676, rebased onto 72e409c)
hold(a hold opens the menu, and its release does not click the row: sidebar row, thread line, Comms panel), arrival, history, participants, composer, tabs, frame, sticky, menu, tall_arrival, menu_text. All exit 0.check.shwith PYTHONFAULTHANDLER=1: exit 0, no fatal or traceback lines. The realtoad.jsonwas untouched.🤖 Generated with Claude Code
https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3