From d9cd4b61bcd3e853ba2a66d06907775b7f6f547d Mon Sep 17 00:00:00 2001 From: Jehan Date: Sat, 9 Dec 2017 01:11:53 +0100 Subject: [PATCH] Bug 791352 - Screenshot delay is broken for region-grab screenshot. Fix first the delay in X11. Actually both for region and window screenshots, it makes no sense to delay *before* region or window selection. Usually when one uses a delay, the point is to prepare in-between selection and shot. For instance, I often used a delay to snap the contents of a menu because PrintScreen key would not work when a menu is opened. So I would set a delay, select my window/region, then quickly open the menu before the delay is counting down. This would not be possible with the way delay occurred (before selection), which just has no use that I can see of. --- plug-ins/screenshot/screenshot-x11.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plug-ins/screenshot/screenshot-x11.c b/plug-ins/screenshot/screenshot-x11.c index aa49db3cda..82aeeaf1ec 100644 --- a/plug-ins/screenshot/screenshot-x11.c +++ b/plug-ins/screenshot/screenshot-x11.c @@ -572,9 +572,6 @@ screenshot_x11_shoot (ScreenshotValues *shootvals, if (screen == NULL) screen = gdk_screen_get_default (); - if (shootvals->select_delay > 0) - screenshot_delay (shootvals->select_delay); - if (shootvals->shoot_type != SHOOT_ROOT && ! shootvals->window_id) { shootvals->window_id = select_window (shootvals, screen); @@ -583,6 +580,9 @@ screenshot_x11_shoot (ScreenshotValues *shootvals, return GIMP_PDB_CANCEL; } + if (shootvals->select_delay > 0) + screenshot_delay (shootvals->select_delay); + display = gdk_screen_get_display (screen); screen_rect.x = 0;