Bug 501593 - I am unable to capture screenshots of Krita's loading window and Plasma Shell's Desktop via "Active Window" mode
Summary: I am unable to capture screenshots of Krita's loading window and Plasma Shell...
Status: REPORTED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Noah Davis
URL: https://discuss.kde.org/t/unable-to-c...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-16 16:17 UTC by Roke Julian Lockhart Beedell
Modified: 2025-03-17 19:32 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
A Screenshot of the Error in the Initial Spectacle GUI (61.51 KB, image/png)
2025-03-16 16:17 UTC, Roke Julian Lockhart Beedell
Details
A Screenshot of the Error Modal Window Spawned by the Preview Spectacle GUI (31.65 KB, image/png)
2025-03-16 16:21 UTC, Roke Julian Lockhart Beedell
Details
A Screenshot of an Apparently Empty Krita Window Captured by Spectacle When it Should Have Captured the Content (10.89 KB, image/png)
2025-03-16 16:22 UTC, Roke Julian Lockhart Beedell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roke Julian Lockhart Beedell 2025-03-16 16:17:52 UTC
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.
Comment 1 Roke Julian Lockhart Beedell 2025-03-16 16:18:34 UTC
(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".
Comment 2 Roke Julian Lockhart Beedell 2025-03-16 16:21:46 UTC
Created attachment 179468 [details]
A Screenshot of the Error Modal Window Spawned by the Preview Spectacle GUI
Comment 3 Roke Julian Lockhart Beedell 2025-03-16 16:22:36 UTC
Created attachment 179469 [details]
A Screenshot of an Apparently Empty Krita Window Captured by Spectacle When it Should Have Captured the Content
Comment 4 Roke Julian Lockhart Beedell 2025-03-16 16:57:20 UTC
(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.
Comment 5 Nate Graham 2025-03-17 19:28:50 UTC
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.
Comment 6 Roke Julian Lockhart Beedell 2025-03-17 19:32:42 UTC
(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.