https://bugs.kde.org/show_bug.cgi?id=374864

David Redondo <k...@david-redondo.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |k...@david-redondo.de

--- Comment #12 from David Redondo <k...@david-redondo.de> ---
I think the cause is that Spectacle calls
org.kde.kwin.Screenshot.screenshotWindowUnderCursor and waits for the
screenshotCreated signal which is never send by KWin. I manually called the
method and also didn't see the signal in dbus-monitor. A quick fix is using
screenshotForWindow as we already grab the Id of the window under the cursor. I
don't know how reliable this is compared to the old approach but I was able to
get a picture of only a right click menu.

diff --git a/src/PlatformBackends/X11ImageGrabber.cpp
b/src/PlatformBackends/X11ImageGrabber.cpp
index 4fbb89f..dc5412d 100644
--- a/src/PlatformBackends/X11ImageGrabber.cpp
+++ b/src/PlatformBackends/X11ImageGrabber.cpp
@@ -585,7 +585,7 @@ void X11ImageGrabber::grabWindowUnderCursor()
             mask |= 1 << 1;
         }

-        interface.call(QStringLiteral("screenshotWindowUnderCursor"), mask);
+        interface.call(QStringLiteral("screenshotForWindow"),
(quint64)windowUnderCursor, mask);
         return;
     }

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to