neon dev unstable here...
start wayland session
press printscreen key
press ESC to cancel the capture
spectacle window is unnecessarily open
Works for me in a Wayland session on 5.11.3. on Kubuntu 17.10. Can you reproduce?
yes, I can.
when I press printscreen under Wayland plasma shows this message
~Create screen shot with left click or enter. Escape or right click to cancel.~
If I press ESC, spectacle is opened and the area where should be the screenshot is empty.
If I press enter the screenshot is correctly taked.
If I press no key during 30 seconds spectacle window opens over the message and no screenshot is taked, like when I press ESC
Tested on Arch, plasma 5.11.3.
Ah I see, you can't cancel out of the initial window selection UI.
same bug in plasma 5.12 beta.
bug persists on Arch Linux, plasma 5.13 beta, spectacle 18.04.1.
This is due to the way KWin handles taking screenshots in Wayland mode. The "click now to take a screenshot" screen is presented by KWin as a security feature to let you know some app is trying to grab the screen image. If you cancel out of it, no image is returned, which is why you see Spectacle with a null image. This works exactly as designed.
KWin doesn't know who asked for the screenshot, so it can't kill the application which requested it if the grab is cancelled. Also, even if it could, how do you differentiate the initial grab and subsequent grabs (with the Take New Screenshot button for example) where Spectacle shouldn't be killed?
Note that we can't just tell KWin our PID and whether we should get killed if the grab is cancelled because:
(a) this information can be faked, and a malicious program could use it to kill other stuff.
(b) in things like Flatpak, Spectacle and KWin might live in different PID namespaces, leading to us killing the wrong app again.
(In reply to Boudhayan Gupta from comment #6)
> If you cancel out of it, no image is returned, which is why you see
> Spectacle with a null image.
Could we maybe have Spectacle display a nice message instead of a null image, so the user knows what happened and what do do next?