Skip to content

Commit 84f5143

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 84f5143

1 file changed

Lines changed: 6 additions & 11 deletions

File tree

mate-screenshot/src/mate-screenshot.c

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,17 +1256,12 @@ loop_dialog_screenshot (void)
12561256
}
12571257
else
12581258
{
1259-
if (interactive_arg)
1260-
{
1261-
/* HACK: give time to the dialog to actually disappear.
1262-
* We don't have any way to tell when the compositor has finished
1263-
* re-drawing.
1264-
*/
1265-
g_timeout_add (200,
1266-
prepare_screenshot_timeout, NULL);
1267-
}
1268-
else
1269-
g_idle_add (prepare_screenshot_timeout, NULL);
1259+
/* HACK: give time to the dialog to actually disappear and keyboard
1260+
* shortcuts to release. We don't have any way to tell when the
1261+
* compositor has finished re-drawing.
1262+
*/
1263+
g_timeout_add (200,
1264+
prepare_screenshot_timeout, NULL);
12701265
}
12711266

12721267
gtk_main ();

0 commit comments

Comments
 (0)