Bug 476811 - [Regression: see №467890] Spectacle not hiding itself properly when taking screenshot
Summary: [Regression: see №467890] Spectacle not hiding itself properly when taking sc...
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 23.08.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-10 22:51 UTC by tidal3179
Modified: 2023-11-29 10:17 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
The rectangular screenshot regression bug (3.25 MB, image/png)
2023-11-10 22:51 UTC, tidal3179
Details
Screenshot showing the bad behavior (373.19 KB, image/png)
2023-11-29 08:00 UTC, Fredrick Brennan
Details
gdbus call --session --dest org.kde.KWin.HighlightWindow --object-path /KWin --method org.kde.KWin.showDebugConsole (47.46 KB, image/png)
2023-11-29 08:09 UTC, Fredrick Brennan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tidal3179 2023-11-10 22:51:23 UTC
Created attachment 163026 [details]
The rectangular screenshot regression bug

SUMMARY
***
Spectacle should hide it's main window when taking a screenshot of a rectangular area. What happens instead is the main spectacle window only disappears partially before I'm able to select the rectangular area for a screenshot. After taking the screenshot the main spectacle window appears semi transparent. This happens regardless of what desktop effects/themes I have enabled, the animation speed has not been changed either.
***


STEPS TO REPRODUCE
1. Press screenshot key to launch spectacle
2.  Click rectangular region option
3. Notice how the main spectacle window doesn't hide itself properly when taking the partial screenshot

OBSERVED RESULT
Main spectacle window appears in the screenshot as a 'ghost'

EXPECTED RESULT
Main spectacle window should disappear and get out of the way before I 'm able to select the area for the screenshot. I shouldn't have to move the main spectacle window out of the way of whatever area I want to capture.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
openSUSE tumbleweed 20231107
KDE Plasma Version:  5.27.9
KDE Frameworks Version:  5.111.0
Qt Version:  5.15.11

ADDITIONAL INFORMATION
A screenshot has been attached. This appears to be a regression since I have not had this issue with previous versions of spectacle, apparently this issue should have been resolved in version 23.04 of spectacle according to bug ID 423435. I'm also using a radeon 5700xt gpu with the default MESA drivers with wayland.
Comment 1 fanzhuyifan 2023-11-14 06:33:02 UTC
Can reproduce on wayland, with faster than default animation speed, with no delay or with a delay of 1s.

In a single monitor setup, this happens with the full screen screenshots.
In a multi monitor setup, this happens with the current screen screenshots, and the all screen screenshots.

Not 100% reproducible, but happens around 50% for me.

Let me know if more information is needed!
Comment 2 fanzhuyifan 2023-11-14 06:34:40 UTC
Btw I am on KDE Frameworks 5.112.0, KDE Plasma Version 5.27.9, and spectacle 23.08.3
Comment 3 David de Cos 2023-11-16 08:49:16 UTC
Can confirm this too. Same as you: in Wayland and with fully updated Plasma, Frameworks and Spectacle.

However, in my case I can reproduce it no matter the delay I set. That is, the delay setting seems to be completely ignored. I can set a 5 second delay and the screenshot is still taken immediately, "catching" the spectacle window before it gets minimized.

Is this not your case?
Comment 4 David de Cos 2023-11-25 20:08:21 UTC
I just solved this by resetting my spectaclerc file (at ~/.config). Even after selecting all my previous options in the spectacle configuration menu, the spectaclerc file remains much smaller and with a lot fewer entries than the old one. So probably some old option, set in a previous version of spectacle, was messing with its behavior.

Please check whether this works for you too, so we can close the bug.
Comment 5 fanzhuyifan 2023-11-25 20:40:33 UTC
(In reply to David de Cos from comment #4)
> I just solved this by resetting my spectaclerc file (at ~/.config). Even
> after selecting all my previous options in the spectacle configuration menu,
> the spectaclerc file remains much smaller and with a lot fewer entries than
> the old one. So probably some old option, set in a previous version of
> spectacle, was messing with its behavior.
> 
> Please check whether this works for you too, so we can close the bug.

Can confirm this fixes the issue for me on master.
Comment 6 tidal3179 2023-11-27 20:15:00 UTC
(In reply to David de Cos from comment #4)
> I just solved this by resetting my spectaclerc file (at ~/.config). Even
> after selecting all my previous options in the spectacle configuration menu,
> the spectaclerc file remains much smaller and with a lot fewer entries than
> the old one. So probably some old option, set in a previous version of
> spectacle, was messing with its behavior.
> 
> Please check whether this works for you too, so we can close the bug.

I tried resetting my spectacle rc file but the issue still persists
Comment 7 Fredrick Brennan 2023-11-29 07:57:37 UTC
For me, Spectacle also puts the end of the animation in images, only on the Wayland session. Will attach a screenshot. Probably related.

Spectacle
Version 23.08.3
Plasma
Version 5.27.9
Frameworks
5.112.0
Kernel
6.6.2-zen1-1-zen (64-bit)

GPU
8 × 11th Gen Intel® Core™ i7-1185G7 @ 3.00GHz
Comment 8 Fredrick Brennan 2023-11-29 08:00:26 UTC
Created attachment 163606 [details]
Screenshot showing the bad behavior
Comment 9 Fredrick Brennan 2023-11-29 08:08:37 UTC
I also have a workaround as my presentation of the bug is more severe so I had to fix it at least for me.

1. Go to [Plugins].
2. Set both `magiclampEnabled` and `kwin4_effect_squashEnabled` to `false`.
3. Restart kwin.

I opened the debug console using:

gdbus call --session --dest org.kde.KWin.HighlightWindow --object-path /KWin --method org.kde.KWin.showDebugConsole

And I believe it is because some property is wrong, likely skipCloseAnimation.
Comment 10 Fredrick Brennan 2023-11-29 08:09:14 UTC
Created attachment 163607 [details]
gdbus call --session --dest org.kde.KWin.HighlightWindow --object-path /KWin --method org.kde.KWin.showDebugConsole
Comment 11 Noah Davis 2023-11-29 10:17:29 UTC
Git commit 84ebfbafd5d398cf7d9051d024a65ba488ab1169 by Noah Davis.
Committed on 29/11/2023 at 11:17.
Pushed by ndavis into branch 'master'.

Hide window before minimizing when taking screenshots

This skips any minimize animations.

M  +2    -0    src/SpectacleCore.cpp

https://invent.kde.org/graphics/spectacle/-/commit/84ebfbafd5d398cf7d9051d024a65ba488ab1169