See attached screenshot. The cursor was over the Kate window, and the Konsole window was partially overlapping the Kate window. "Window Under Cursor" mode undesirably captured the overlapping part of the Konsole window, too. 100% reproducible when any case of Window X partially overlapping window Y, and you take a screenshot of window Y with Window Under Cursor mode.
Created attachment 110831 [details] Overlapping window mistakenly captured, too
Can you check whether that's actually Spectacle or a bug in KWin's screenshotForWindow DBus grabber?
Testing in IceWM the behaviour is the same. Probably NOTABUG, but might be a usability issue. See https://phabricator.kde.org/D10673#210005.
Hmm, yeah, possibly. I would be strongly in favor of collapsing the two modes into one, if we can do it without losing features.
Tracking that in https://phabricator.kde.org/T8033
Putting this ticket on confirmed as it's still reproducing using the master branches. The resolution of this will depend of T8033.
I also have this issue. Arch Linux Plasma 5.15.3 KDE Applications 19.03.80 KDE Frameworks 5.56 Qt 5.13.0beta1
I'm unable to reproduce at least on Wayland. Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.23.80 KDE Frameworks Version: 5.88.0 Qt Version: 5.15.3 Graphics Platform: Wayland
Steps to reproduce: Open Spectacle, set to 'Window under cursor', uncheck 'Capture the current pop-up only'. Click on 'Take a New Screenshot'. ---- When checking 'Capture the current pop-up only', it doesn't include an overlapping window. When using META+CTRL+Print, it also doesn't include an overlapping window. Launching via shortcut doesn't check for 'mCaptureTransientOnly'. Whereas launching via the button, checks 'mCaptureTransientOnly': https://invent.kde.org/graphics/spectacle/-/blob/master/src/Gui/KSWidget.cpp#L261