Skip to content

Commit 7914c08

Browse files
committed
mate-screenshot: Fix area selection timing with keyboard shortcuts
This prevents possible race conditions when launched via keyboard shortcuts. The delay allows keyboard handlers to release before input grabbing begins. Fixes #37
1 parent ae9b1eb commit 7914c08

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

mate-screenshot/src/mate-screenshot.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,11 +1256,12 @@ loop_dialog_screenshot (void)
12561256
}
12571257
else
12581258
{
1259-
if (interactive_arg)
1259+
if (interactive_arg || take_area_shot)
12601260
{
1261-
/* HACK: give time to the dialog to actually disappear.
1261+
/* HACK: give time to the dialog to actually disappear or keyboard
1262+
* shortcuts to release their grab.
12621263
* We don't have any way to tell when the compositor has finished
1263-
* re-drawing.
1264+
* re-drawing or when keys are un-grabbed.
12641265
*/
12651266
g_timeout_add (200,
12661267
prepare_screenshot_timeout, NULL);

0 commit comments

Comments
 (0)