Bug 466082

Summary: Taking a second screenshot with the Print Screen key, with Spectacle in "rectangular selection" mode, results in the darkened area being drawn under Spectacle's title bar
Product: [Applications] Spectacle Reporter: Unused Account <mxanthropocene>
Component: GeneralAssignee: Boudhayan Gupta <me>
Status: RESOLVED DUPLICATE    
Severity: major CC: kde, p.r.worrall
Priority: NOR    
Version First Reported In: 22.12.2   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Unused Account 2023-02-19 13:12:49 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

When using Spectacle to take screenshots, set to the "rectangular selection" mode, the first one will work properly. Subsequent screenshots taken by pressing the Print Screen key while Spectacle is open will result in the darkened selection area being drawn under Spectacle's title bar instead of over the screen as expected. This does not occur if you click the "Take new screenshot" button. This happens on Wayland.

STEPS TO REPRODUCE
1. In a Plasma Wayland session, open Spectacle and set it to "rectangular selection" mode. Press Print Screen - it works as normal.
2. Draw a selection and press Enter to accept it. Press Print Screen again.
3. The darkened area is drawn under Spectacle's title bar instead of over the screen as it was the first time.

OBSERVED RESULT
The darkened area is drawn under Spectacle's title bar.

EXPECTED RESULT
The darkened area is drawn over the entire desktop as normal.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 38
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.2.0-0.rc8.57.fc38.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 3800X 8-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 570 Series
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: X570 AORUS MASTER
System Version: -CF

ADDITIONAL INFORMATION
Pressing Print Screen multiple times in the darkened area just results in more darkened overlays, which seems inappropriate. That should probably just reset the UI or take the screenshot instead.
Comment 1 Paul Worrall 2023-02-19 16:06:59 UTC

*** This bug has been marked as a duplicate of bug 465988 ***