screenshot: guard against double _ungrab in area/color/window pickers - #13948
screenshot: guard against double _ungrab in area/color/window pickers#13948rumours86 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>
|
Amended: the |
8cae76b to
7f719ed
Compare
|
Now verified against git master (built muffin + cinnamon 6.7.5, run nested): on unpatched master a second 🤖 Addressed by Claude Code |
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