STEPS TO REPRODUCE 1. start Wayland session 2. open Spectacle by pressing printscreen key 3. set "Area" to "Window under cursor" 4. click on "Take a new screenshot" button OBSERVED RESULT Spectacle says "Select window to screen shot with left click or Enter. Escape or right click to cancel". If I cancel with Escape key or right click, Spectacle opens and displays "Could not take a screenshot. Please report this bug here: create a spectacle bug" inline message. EXPECTED RESULT Spctacle should immadiately take a screenshot in "Window under cursor" mode after we click on "Take a new screenshot" button SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.20.80 KDE Frameworks Version: 5.78.0 Qt Version: 5.15.2
I can reproduce this consistently every time on current Spectacle from git (21.03.70).
From what I can see this may be related to global cursor positions being unavailable under wayland. Some other kde applications are facing similar issues: https://bugs.kde.org/show_bug.cgi?id=411681 https://bugs.kde.org/show_bug.cgi?id=429177
if I press ESC while confirmation popup is visible, Spectacle shows this error: "Cannot save an empty screenshot image." Operating System: Arch Linux KDE Plasma Version: 5.22.90 KDE Frameworks Version: 5.86.0 Qt Version: 5.15.2 Graphics Platform: Wayland
(In reply to Patrick Silva from comment #3) > if I press ESC while confirmation popup is visible, Spectacle shows this > error: > > "Cannot save an empty screenshot image." > This is the currently expected behavior. The OSD "Select window to screen shot with left click or Enter. Escape or right click to cancel" is in fact KWin. In wayland we want to prevent unprivileged application to take any applications screenshots. This is to prevent an application to say make screenshots of potentially sensitive information displayed on screen. We don't have our mindset currently as to how support this use case for Wayland. My guess would be to handle the screenshot shorcuts in KWin directly. As a workaround, one can use screen capture with pipewire to obtain the same result, for instance with OBS.
This is intentional behavior, so I'm marking it as such. We should change the name of the capture mode once X11 is made to behave the same way as Wayland. Unrelated to this bug report, but before making X11 behave like Wayland, it would be good to find a way to make the interactive window selection capture menus.