Skip to content

mate-screenshot: Fix area selection timing with keyboard shortcuts#377

Open
vkareh wants to merge 1 commit intomasterfrom
area-screenshot-delay
Open

mate-screenshot: Fix area selection timing with keyboard shortcuts#377
vkareh wants to merge 1 commit intomasterfrom
area-screenshot-delay

Conversation

@vkareh
Copy link
Copy Markdown
Member

@vkareh vkareh commented Mar 17, 2026

This prevents possible race conditions when launched via keyboard shortcuts. The delay allows keyboard handlers to release before input grabbing begins.

@vkareh vkareh requested a review from a team March 17, 2026 15:22
@cwendling
Copy link
Copy Markdown
Member

As the hack already exists why not, but I'd rather see that on the other side of things, that is on the keybinding handlers or simply the commands themselves (I personally used something like sh -c 'sleep 0.25 && mate-screenshot --area'). The advantage of having this in the keybinding handler side is that it can affect any command, not just screenshot, plus on that end it could be possible to actually know when the keys were un-grabbed.

This prevents possible race conditions when launched via keyboard
shortcuts. The delay allows keyboard handlers to release before input
grabbing begins.

Fixes #37
@vkareh vkareh force-pushed the area-screenshot-delay branch from 84f5143 to 7914c08 Compare March 17, 2026 17:12
@vkareh
Copy link
Copy Markdown
Member Author

vkareh commented Mar 17, 2026

@cwendling good point, but fixing the at the keybinding handler level seems like would bring up some edge cases I'm not sure I want to test :P

For now, I changed this commit to be more specifically targetted to area screenshots, and leave the else { g_idle_add } in place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants