Bug 481471 - Attempting to take a rectangular area screenshot after taking a rectangular area screen*cast* banishes my desktop to the shadow realm (??)
Summary: Attempting to take a rectangular area screenshot after taking a rectangular a...
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 24.01.95
Platform: Arch Linux Linux
: NOR grave
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-02-17 15:35 UTC by Adam Fontenot
Modified: 2024-04-12 20:36 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
photo of a screen showing the problem (2.15 MB, image/jpeg)
2024-02-17 15:35 UTC, Adam Fontenot
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Fontenot 2024-02-17 15:35:56 UTC
Created attachment 165906 [details]
photo of a screen showing the problem

SUMMARY

This is fully reproducible for me.

STEPS TO REPRODUCE
1. Take a video of a rectangular region of the screen. I can only do this with VP9 due to another bug.
2. Without closing Spectacle, open the rectangle select tool for screenshots.
3. Hit the enter key to accept the rectangular selection, without modifying it. 

OBSERVED RESULT

See photo. (The reproduction steps break my desktop so I have no easy way to take a screenshot of the problem.)

A darkened version of my screen appears, which is non-interactable. It looks like a fullscreen window except that it appears below the "real" panel at the top. I'm unable to close it or switch to a different application. I'm forced to switch vterms and `pkill spectacle` to escape the situation.

The Spectacle related widgets shown in the image (like the rectangle select tool) are likewise non-interactable.

EXPECTED RESULT

Spectacle takes a screenshot of a rectangular area, as requested.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.93.0
KDE Frameworks Version: 5.249.0
Qt Version: 6.7.0
Kernel Version: 6.7.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 Adam Fontenot 2024-02-17 15:42:45 UTC
This also sort-of happens if you take two rectangular area screencasts back to back. The difference is that the desktop remains interactable, so I can kill spectacle without having to resort to a different vterm.
Comment 2 Nate Graham 2024-02-21 17:04:16 UTC
Oh my goodness, can reproduce. This is quite bad.
Comment 3 Noah Davis 2024-03-01 11:11:04 UTC
*** Bug 482006 has been marked as a duplicate of this bug. ***
Comment 4 Noah Davis 2024-03-01 11:33:51 UTC
Git commit 0c491bb984825cac4366dc181c0ea04e18714934 by Noah Davis.
Committed on 01/03/2024 at 11:33.
Pushed by ndavis into branch 'master'.

Finish recording instead of activating when activated from shortcut while recording

Someday we should find a way to support screenshot shortcuts while recording in some way. For now we have behavior that is safe, if not always expected.

M  +14   -16   src/SpectacleCore.cpp

https://invent.kde.org/graphics/spectacle/-/commit/0c491bb984825cac4366dc181c0ea04e18714934
Comment 5 Noah Davis 2024-03-01 11:35:03 UTC
Git commit 58b23bdf7fa0025635ea3f81d53c17de3f40d9c6 by Noah Davis.
Committed on 01/03/2024 at 11:34.
Pushed by ndavis into branch 'release/24.02'.

Finish recording instead of activating when activated from shortcut while recording

Someday we should find a way to support screenshot shortcuts while recording in some way. For now we have behavior that is safe, if not always expected.
(cherry picked from commit 0c491bb984825cac4366dc181c0ea04e18714934)

M  +14   -16   src/SpectacleCore.cpp

https://invent.kde.org/graphics/spectacle/-/commit/58b23bdf7fa0025635ea3f81d53c17de3f40d9c6
Comment 6 Adam Fontenot 2024-03-01 18:53:49 UTC
Reopening: I tested the patch (against 24.02.0), and it did not fix the issue!

My reading of the commit message suggests that this was intended to fix something else. I'm not using any shortcuts to start Spectacle in this case, and I'm not activating one recording while another one is in progress.

Reproduction:

1. Take a video of a rectangular region of the screen. STOP the recording, and return to the Spectacle interface.
2. Without closing Spectacle, switch from the "Recording" tab to the "Screenshot" tab.
3. Open the rectangular select tool for screenshots.
4. Hit the enter key to immediately select the preset rectangular region.
Comment 7 Adam Fontenot 2024-03-01 18:58:40 UTC
The changes probably fix Bug 482006, which was duped to this. I think it should be unduped and this should stay open.
Comment 8 Nate Graham 2024-03-04 19:19:27 UTC
Urgh, I can reproduce the issue still as well.
Comment 9 Bug Janitor Service 2024-04-12 14:02:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/345
Comment 10 Adam Fontenot 2024-04-12 14:23:50 UTC
QA: patch fixes the issue for me when applied on top of 24.02.2.
Comment 11 Noah Davis 2024-04-12 20:36:48 UTC
Git commit e858708dc74269007d1eb12eb1bdae81f091e1c5 by Noah Davis.
Committed on 12/04/2024 at 20:36.
Pushed by ndavis into branch 'master'.

Disable video mode when a new rectangle capture screenshot is started

This was a missing line of code. Without this, doing a rectangle screenshot capture after a video capture causes the fullscreen windows to visually freeze while also being impossible to interact with.

It would be nice if someday we replaced setVideoMode with something that requires less manual management. Manual state management is error prone because it's easy to forget to do it properly.

M  +1    -1    src/SpectacleCore.cpp

https://invent.kde.org/graphics/spectacle/-/commit/e858708dc74269007d1eb12eb1bdae81f091e1c5