[gimp] Bug 791352 - Screenshot delay is broken for region shots in GNOME.



commit 614bcf6d0aabb2d41d08f2c9ec6f2ede157f5f9b
Author: Jehan <jehan girinstud io>
Date:   Sat Dec 9 01:28:15 2017 +0100

    Bug 791352 - Screenshot delay is broken for region shots in GNOME.
    
    Delay should indeed happen before root and window screenshots, but must
    happen in-between region selection and region screenshot.
    
    One can notice that the logics is different for Windows screenshot in
    X11. The reason is that X11 window screenshot has an additional window
    selection step (and therefore delay must happen in between selection and
    actual screenshot). Window screenshot in Wayland doesn't have this step
    and simply screenshots whatever is the currently active Window.

 plug-ins/screenshot/screenshot-gnome-shell.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/plug-ins/screenshot/screenshot-gnome-shell.c b/plug-ins/screenshot/screenshot-gnome-shell.c
index 406b98a..a5b00e8 100644
--- a/plug-ins/screenshot/screenshot-gnome-shell.c
+++ b/plug-ins/screenshot/screenshot-gnome-shell.c
@@ -87,14 +87,14 @@ screenshot_gnome_shell_shoot (ScreenshotValues  *shootvals,
   gint         monitor = shootvals->monitor;
   gboolean     success;
 
-  if (shootvals->select_delay > 0)
-    screenshot_delay (shootvals->select_delay);
-
   filename = gimp_temp_name ("png");
 
   switch (shootvals->shoot_type)
     {
     case SHOOT_ROOT:
+      if (shootvals->select_delay > 0)
+        screenshot_delay (shootvals->select_delay);
+
       method = "Screenshot";
       args   = g_variant_new ("(bbs)",
                               shootvals->show_cursor,
@@ -134,9 +134,15 @@ screenshot_gnome_shell_shoot (ScreenshotValues  *shootvals,
         gdk_screen_get_monitor_at_point (screen,
                                          (shootvals->x1 + shootvals->x2) / 2,
                                          (shootvals->y1 + shootvals->y2) / 2);
+      if (shootvals->select_delay > 0)
+        screenshot_delay (shootvals->select_delay);
+
       break;
 
     case SHOOT_WINDOW:
+      if (shootvals->select_delay > 0)
+        screenshot_delay (shootvals->select_delay);
+
       method = "ScreenshotWindow";
       args   = g_variant_new ("(bbbs)",
                               shootvals->decorate,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]