Bug 467401

Summary: Taking multiple consecutive Rectangular Region screenshots results in multiple full-screen overlays appearing
Product: [Applications] Spectacle Reporter: Nate Graham <nate>
Component: GeneralAssignee: Boudhayan Gupta <me>
Status: RESOLVED FIXED    
Severity: normal CC: kde, noahadvs
Priority: NOR Keywords: regression
Version First Reported In: git-master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nate Graham 2023-03-15 15:04:10 UTC
STEPS TO REPRODUCE
1. Launch Spectacle
2. Take a rectangular region screenshot with the "Rectangular Region" button and accept the screenshot to show the viewer window again
3. In the viewer window, click "Rectangular Region" button again


OBSERVED RESULT
Two full-screen overlays appear, not one. After you accept the screenshot in one of the overlays to show the viewer window again, the second overlay is still visible behind the viewer window.

If I take a third Rectangular Region screenshot, three overlays appear!


EXPECTED RESULT
That doesn't happen. :)
Comment 1 Bug Janitor Service 2023-03-15 15:34:43 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/213
Comment 2 Noah Davis 2023-03-15 16:01:34 UTC
Git commit 91761ff95981d52efc217bda3f068a28d6156118 by Noah Davis.
Committed on 15/03/2023 at 15:34.
Pushed by ndavis into branch 'master'.

Use deleteLater() to delete SpectacleWindows

It turns out QWindow::destroy(), effectively called by QWindow::close()
(according to Qt docs), doesn't actually delete windows.

M  +1    -2    src/Gui/SpectacleWindow.cpp

https://invent.kde.org/graphics/spectacle/commit/91761ff95981d52efc217bda3f068a28d6156118
Comment 3 Noah Davis 2023-03-15 16:13:31 UTC
Git commit e046222c9908423c3156f7abd52a72baf32913d4 by Noah Davis.
Committed on 15/03/2023 at 16:13.
Pushed by ndavis into branch 'release/23.04'.

Use deleteLater() to delete SpectacleWindows

It turns out QWindow::destroy(), effectively called by QWindow::close()
(according to Qt docs), doesn't actually delete windows.


(cherry picked from commit 91761ff95981d52efc217bda3f068a28d6156118)

M  +1    -2    src/Gui/SpectacleWindow.cpp

https://invent.kde.org/graphics/spectacle/commit/e046222c9908423c3156f7abd52a72baf32913d4