diff options
| author | Victor Kareh <[email protected]> | 2025-08-28 16:39:23 -0400 |
|---|---|---|
| committer | Victor Kareh <[email protected]> | 2026-03-17 13:12:20 -0400 |
| commit | 7914c0861b91282868563e339392d413f88c321d (patch) | |
| tree | 37f3a38b395dcc68254353c7388a979e19cd0391 | |
| parent | ae9b1eb0564403938b7f14eda724d2f29c6a356a (diff) | |
| download | mate-utils-area-screenshot-delay.tar.bz2 mate-utils-area-screenshot-delay.tar.xz | |
mate-screenshot: Fix area selection timing with keyboard shortcutsarea-screenshot-delay
This prevents possible race conditions when launched via keyboard
shortcuts. The delay allows keyboard handlers to release before input
grabbing begins.
Fixes mate-desktop/mate-utils#37
| -rw-r--r-- | mate-screenshot/src/mate-screenshot.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mate-screenshot/src/mate-screenshot.c b/mate-screenshot/src/mate-screenshot.c index df203a88..11e9ba09 100644 --- a/mate-screenshot/src/mate-screenshot.c +++ b/mate-screenshot/src/mate-screenshot.c @@ -1256,11 +1256,12 @@ loop_dialog_screenshot (void) } else { - if (interactive_arg) + if (interactive_arg || take_area_shot) { - /* HACK: give time to the dialog to actually disappear. + /* HACK: give time to the dialog to actually disappear or keyboard + * shortcuts to release their grab. * We don't have any way to tell when the compositor has finished - * re-drawing. + * re-drawing or when keys are un-grabbed. */ g_timeout_add (200, prepare_screenshot_timeout, NULL); |
