[gimp] plug-ins: force at least 0.5s delay to full-screen screenshots on KDE.



commit 9b82bc3e765b2c4629fa0acff185a029a0a7afa8
Author: Jehan <jehan girinstud io>
Date:   Sun Dec 10 01:50:07 2017 +0100

    plug-ins: force at least 0.5s delay to full-screen screenshots on KDE.
    
    The plug-in dialog GUI was always visible in my full-screen screenshots
    on KDE, when no delay. It seems the culprit is their fading out effect
    which takes longer than the screenshot to happen, therefore the dialog
    was showing up with transparency.

 plug-ins/screenshot/screenshot-kwin.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/screenshot/screenshot-kwin.c b/plug-ins/screenshot/screenshot-kwin.c
index 8026118..ab74d64 100644
--- a/plug-ins/screenshot/screenshot-kwin.c
+++ b/plug-ins/screenshot/screenshot-kwin.c
@@ -97,6 +97,15 @@ screenshot_kwin_shoot (ScreenshotValues  *shootvals,
     case SHOOT_ROOT:
       if (shootvals->screenshot_delay > 0)
         screenshot_delay (shootvals->screenshot_delay);
+      else
+        {
+          /* As an exception, I force a delay of at least 0.5 seconds
+           * for KWin. Because of windows effect slowly fading out, the
+           * screenshot plug-in GUI was constantly visible (with
+           * transparency as it is fading out) in 0s-delay screenshots.
+           */
+          g_usleep (500000);
+        }
 
       method = "screenshotFullscreen";
       args   = g_variant_new ("(b)", shootvals->show_cursor);


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