fix: clear this.grabOp when the grab ends#526
Open
mayconrcmello wants to merge 1 commit intoforge-ext:mainfrom
Open
fix: clear this.grabOp when the grab ends#526mayconrcmello wants to merge 1 commit intoforge-ext:mainfrom
mayconrcmello wants to merge 1 commit intoforge-ext:mainfrom
Conversation
`_handleGrabOpBegin` sets `this.grabOp = grabOp` but `_handleGrabOpEnd` never clears it. The flag is also read in `updateMetaWorkspaceMonitor` to decide whether to skip the tabbed-focus update during an active drag. Once the user has done a single base grab, `this.grabOp` retains `Meta.GrabOp.WINDOW_BASE` for the rest of the session, and every subsequent workspace/monitor change for a tabbed window suppresses the focus update — even when no grab is in progress. The other consumer of `this.grabOp`, `_handleResizing`, only fires during an active resize grab, so clearing the flag at grab-end has no effect on it. Pairs with the operator-precedence fix in forge-ext#524 (which corrected the direction of the same condition); without this clear the precedence fix mostly goes back to no-op after the user's first drag.
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
_handleGrabOpBeginwritesthis.grabOp = grabOp._handleGrabOpEndnever clears it.this.grabOpis read by:updateMetaWorkspaceMonitor()— to decide whether the tabbed-focus update is safe (skip during a drag)._handleResizing()— to decompose the grab type into directions during an active resize.Consumer (2) only runs during an active resize grab, so a stale value can't reach it. Consumer (1) is the problem: after the user's first base grab,
this.grabOpretainsMeta.GrabOp.WINDOW_BASEfor the entire session, and every subsequent workspace/monitor change for a tabbed window goes through the "skip update" branch — even when no grab is in progress.Fix
Clear
this.grabOp = nullat the end of_handleGrabOpEnd.Pairs with #524
#524 corrects the operator-precedence bug on the same condition. Without this clear, the precedence fix would mostly go back to a no-op after the user's first drag, because the flag stays stuck on
WINDOW_BASE. They're independent (either could land first) but the user-visible behaviour only becomes correct with both.Test plan
node --checkSuper+Shift+1..9: the tab head re-renders correctly. Without this fix, the tab head would never update again until gnome-shell restart.