Created attachment 179467 [details] A Screenshot of the Error in the Initial Spectacle GUI SUMMARY I am unable to capture screenshots using "Active Window" mode for the Plasma shell desktop under very specific circumstances: 1. When the *initial* Spectacle GUI is used, so not the one that displays an image. In this case, the key bindings continue to operate. 2. I'm attempting to capture a screenshot of Krita's loading window, whether via the initial or preview-based GUIs. In *that* case, "Select Window" works, but the key bindings do not. STEPS TO REPRODUCE The more comprehensive reproduction steps are aforementioned. The undermentioned are very specific steps to reproduce one of the two problems: 1. Invoke "spectacle --new-instance" (twice). 2. Hide all windows, except that which is for the desktop. 3. Select the desktop. 4. Select Spectacle's GUI. 5. Select "Active Window". OBSERVED RESULT I am unable to capture the screenshot. Instead, I see the undermentioned: > An error occurred while taking a screenshot. > KWin screenshot request failed: > Invalid window requested > Potentially relevant information: > - Method: CaptureActiveWindow > - Method specific arguments: QMap(("include-decoration", QVariant(bool, true))("include-shadow", QVariant(bool, false))("native-resolution", QVariant(bool, true))) EXPECTED RESULT I should always be able to capture the focused window in "Active Window" mode. SOFTWARE/OS VERSIONS > Operating System: Fedora Linux 41 > KDE Plasma Version: 6.3.3 > KDE Frameworks Version: 6.12.0 > Qt Version: 6.8.2 > Kernel Version: 6.13.6-200.fc41.x86_64 (64-bit) > Graphics Platform: Wayland ADDITIONAL INFORMATION Originally discussed at https://discuss.kde.org/t/unable-to-capture-screenshot-of-krita-loading-window/31426/5?u=rokejulianlockhart.
(In reply to Roke Julian Lockhart Beedell from comment #0) I'm using "spectacle-6.3.3-1.fc41.x86_64". I don't know what date-based version that correlates with in Bugzilla, so I've left this as "Unspecified".
Created attachment 179468 [details] A Screenshot of the Error Modal Window Spawned by the Preview Spectacle GUI
Created attachment 179469 [details] A Screenshot of an Apparently Empty Krita Window Captured by Spectacle When it Should Have Captured the Content
(In reply to Roke Julian Lockhart Beedell from comment #0) > I'm attempting to capture a screenshot of Krita's loading window, whether via the initial or preview-based GUIs. In *that* case, "Select Window" works, but the key bindings do not. According to https://discuss.kde.org/t/unable-to-capture-screenshot-of-krita-loading-window/31426/9?u=rokejulianlockhart, this also occurs on GIMP and Audacity's loading windows, so it's not Krita-specific.
With the git master version, I can't reproduce this issue with those steps for the Plasma desktop (which indeed is technically a window, as you appeared to be probing). However I can sort of reproduce it for Krita's splash screen; it doesn't want to be counted as an active window; Spectacle screenshots whatever was one window lower in the window stacking order. I don't see the error message you do though. It just screenshots something else.
(In reply to Nate Graham from comment #5) > However I can sort of reproduce it for Krita's splash screen; it doesn't want to be counted as an active window; Spectacle screenshots whatever was one window lower in the window stacking order. > > I don't see the error message you do though. It just screenshots something else. That's indeed the behaviour I saw that caused the empty window screenshot to be generated. I'd thought I was going crazy, because I could have sworn I'd see for a mere moment in Spectacle's preview the loading window, before it'd be (apparently) automatically replaced by the desktop or main Krita GUI.
Created attachment 180667 [details] A Screenshot Of Android Studio's "Choose Process" Window (In reply to Nate Graham from comment #5) Perhaps it'll be easier for you to test with the Android Studio Flatpak package. As https://github.com/flathub/com.google.AndroidStudio/issues/268#issue-3021075697 demonstrates, the "Run" > "Attach Debugger to Android Process" > "Choose Process" window, very strangely, also generates the same error: > An error occurred while taking a screenshot. > KWin screenshot request failed: > Invalid window requested > Potentially relevant information: > - Method: CaptureActiveWindow > - Method specific arguments: QMap(("include-decoration", QVariant(bool, true))("include-shadow", QVariant(bool, false))("native-resolution", QVariant(bool, true)))
Created attachment 180668 [details] A Screenshot Of Spectacle When Attempting To Capture Android Studio's "Choose Process" Window Via The "Active Window" Mode (In reply to Roke Julian Lockhart Beedell from comment #7)
It's not completely clear, but it seems like it might be intentional that you can't get screenshot from KWin of the real screenlocker for security. You should be able to to take screenshots if you open the screenlocker in a window like what was described in the original discussion thread. Spectacle may be able to get a message from KWin to cancel the screenshot so that you don't see this as an error in the future.
(In reply to Noah Davis from comment #9) I presume that you're referring to https://bugs.kde.org/show_bug.cgi?id=506534. If so, have you seen https://discuss.kde.org/t/how-to-screenshot-kscreenlocker/36494/15?u=rokejulianlockhart? It's quite possible, on both Wayland and X: it's solely on my laptop that it fails, and without CSDs, it's just a window like any other.
(In reply to Roke Julian Lockhart Beedell from comment #10) > (In reply to Noah Davis from comment #9) > > I presume that you're referring to > https://bugs.kde.org/show_bug.cgi?id=506534. If so, have you seen > https://discuss.kde.org/t/how-to-screenshot-kscreenlocker/36494/ > 15?u=rokejulianlockhart? It's quite possible, on both Wayland and X: it's > solely on my laptop that it fails, and without CSDs, it's just a window like > any other. oops, commented in the wrong report