gestures: don't disable swipe trackers mid-gesture (GNOME 49/50 overview hang)#1166
Open
woongzeyi wants to merge 1 commit into
Open
gestures: don't disable swipe trackers mid-gesture (GNOME 49/50 overview hang)#1166woongzeyi wants to merge 1 commit into
woongzeyi wants to merge 1 commit into
Conversation
…iew hang) On GNOME 49+ SwipeTracker.set enabled(false) calls _interrupt() when the tracker is State.SCROLLING, emitting a synthetic end that drives the overview into an illegal state transition (Invalid overview shown transition ...), hanging the overview and freezing the shell. Guard every mid-gesture tracker disable: track an inGesture flag, defer the overview hidden disable to idle (skipped while a gesture is live), and skip the pillSwipeTimer disable during a gesture. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Fixes the overview hang / shell freeze that happens when a 3-finger up-to-overview gesture immediately follows another 3-finger gesture on GNOME 49/50.
Fixes #1165
Root cause
GNOME 49 rewrote
SwipeTracker. Itsenabledsetter now interrupts an in-progress gesture instead of just flipping a flag:So calling
swipeTrackersEnable(false)while the overview tracker is mid-gesture emits a syntheticend, which pushes the overview into an illegal state transition:The overview animation then never completes and the shell wedges (pressing Super afterwards freezes it).
PaperWM disables trackers from a few spots that can run while an overview hand-off gesture is live. The
Main.overview 'hidden'handler fires during the hand-off on every up-swipe; thepillSwipeTimer(300 ms) can land inside the next gesture.Fix
Never disable a tracker while a PaperWM gesture is in progress:
inGestureflag (set atBEGIN, cleared atEND/CANCEL) and anisInGesture()accessor. Defer theoverview 'hidden'tracker-disable to idle and skip it wheninGestureis still set, so the in-flight overview animation settles (tracker →State.NONE) before anything disables it.pillSwipeTimerskips disabling trackers whenGestures.isInGesture()is true.Follow-finger overview hand-off is unchanged.
Testing
Invalid overview shown transition …; Super then froze the shell.Invalid overview …errors and no hang. Verified viajournalctl --user.