screenshot: guard against double _ungrab in area/color/window pickers - #13948
Open
rumours86 wants to merge 1 commit into
Open
screenshot: guard against double _ungrab in area/color/window pickers#13948rumours86 wants to merge 1 commit into
rumours86 wants to merge 1 commit into
Conversation
A second BUTTON_RELEASE (or BUTTON_PRESS for SelectWindow) arriving within the 100ms fade-out animation scheduled a second _ungrab(), so Main.popModal() ran twice for the same actor. The second call takes the 'incorrect pop' error path in main.js, which first tears down the stage input mode and the X grab and only then throws - the exception aborts _ungrab() before this._group.destroy(), so the fullscreen selection overlay stays on screen: clicks land on the overlay and the panel appears frozen until the shell is restarted. Reproducible with an area screenshot by clicking once more right after releasing the selection (e.g. xdotool ... mouseup 1 click 1). Finish the selection on the first release only, ignore extra input during the fade-out, and make _ungrab() idempotent in all three pickers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Author
|
Amended: the |
rumours86
force-pushed
the
fix-screenshot-double-ungrab
branch
from
August 24, 2026 01:19
8cae76b to
7f719ed
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.
The bug. A second BUTTON_RELEASE (or BUTTON_PRESS for
SelectWindow) arriving within the 100ms fade-out animation schedules a second_ungrab(), soMain.popModal()runs twice for the same actor. The second call takes theincorrect poperror path inmain.js, which first tears down the stage input mode and the X grab and only then throws — the exception aborts_ungrab()beforethis._group.destroy(), so the fullscreen selection overlay stays on screen: clicks land on the overlay and the panel appears frozen until the shell is restarted.Reproduce. Take an area screenshot and click once more right after releasing the selection, e.g.:
Watch
~/.xsession-errorsforJS ERROR: Error: incorrect popfromscreenshot.js— one affected user had six occurrences in two days of normal use.The fix. Finish the selection on the first release only, ignore extra input during the fade-out, and make
_ungrab()idempotent in all three pickers (SelectArea,PickColor,SelectWindow).Verified on Cinnamon 6.6.9 (Mint 22.3): normal area selection still returns the same geometry; the reproducer above no longer throws (3 runs), overlay is destroyed properly.
🤖 Generated with Claude Code