Meaning of delay in screenshot plugin

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

 



 I found myself today in the need to take a screenshot of a window
with an open menu. I selected Acquire->Screenshot in gimp and in the
dialog I chose a delay of 5 seconds, to give me time to open the menu
after I selected the window to grab. But, after a while I figured out
that gimp first waits for the 5 seconds to pass and then gives you the
chance to select the window. That is the exact opposite of what I
expected and didn't allow me to take the screenshot of the open menu I
wanted. Maybe if I had selected to take a screenshot of the entire
screen I would have been able to do my job, but I wrote the patch in
the end of the message quicker. My ultra small patch just selects the
window _first_ and grabs after applying the delay.
 To summarize, I think the current behaviour of screenshot.c is the
opposite of what a user expects, has no practical value I can think of
and in use cases as mine has dramatic impact in usability. Of course,
there is a possibility that I miss something and that is why I send
this patch here, so we can talk about what is "right" and "wrong".


Index: screenshot.c
===================================================================
--- screenshot.c        (revision 21691)
+++ screenshot.c        (working copy)
@@ -328,9 +328,6 @@

   if (status == GIMP_PDB_SUCCESS)
     {
-      if (shootvals.select_delay > 0)
-       shoot_delay (shootvals.select_delay);
-
       if (shootvals.shoot_type != SHOOT_ROOT && ! shootvals.window_id)
         {
           shootvals.window_id = select_window (screen);
@@ -342,6 +339,9 @@

   if (status == GIMP_PDB_SUCCESS)
     {
+      if (shootvals.select_delay > 0)
+       shoot_delay (shootvals.select_delay);
+
       image_ID = shoot (screen);

       if (image_ID == -1)
_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux