Allow PullDownMenu during TUI app mouse tracking#36
Merged
Conversation
a605367 to
f924c61
Compare
When TUI apps (htop, btop, tmux) enable mouse tracking, TerminalView calls setKeepMouseGrab(true) which blocks SilicaFlickable from receiving the drag gesture needed for PullDownMenu. Fix: when mouse tracking is active, touches in the top gesture zone (passDownZoneHeight, set from Theme.itemSizeLarge in QML) are not accepted by touchEvent, allowing them to propagate to the parent SilicaFlickable for PullDownMenu. A safety net in mousePressEvent also checks the zone in case Qt synthesizes a mouse event from the unaccepted touch. Touches below the zone and two-finger scrolls are unaffected.
f924c61 to
534f0e6
Compare
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.
TerminalView calls setKeepMouseGrab(true) when TUI apps enable mouse tracking, which blocks the PullDownMenu from receiving drag gestures.
When mouse tracking is active, touches in the top ~100px now pass through to the parent SilicaFlickable without being accepted. Zone height is configurable via pullDownZoneHeight property (set to Theme.itemSizeLarge from QML).