[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Bug 495216 - Spectacle is capturing itself during screenshots.
Summary: Spectacle is capturing itself during screenshots.
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 24.08.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-23 00:40 UTC by zvova7890
Modified: 2025-01-29 21:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zvova7890 2024-10-23 00:40:10 UTC
SUMMARY
After the last update, Spectacle was capturing its own window in the Wayland session. The log included this message:
QVariantAnimation::setDuration: cannot set a negative duration

It seems that in the SpectacleCore::takeNewScreenshot function, the timeout variable was set to -1 and passed to the m_delayAnimation->setDuration(timeout); function, causing the issue. I went to the configuration file and removed the "captureOnClick" option. After that, everything worked fine.

[GuiConfig]
captureOnClick=true
quitAfterSaveCopyExport=true

Simple check like:
if (timeout < 0) {
    timeout = 0;
}

Also resolves the issue.

STEPS TO REPRODUCE
1. Update ArchLinux to the last version
2. Open Spectacle
3. Do, for example, fullscreen screenshot

OBSERVED RESULT
Spectacle is not hiding while taking a screenshot and appears in the screenshot.

EXPECTED RESULT
Spectacle should not appear in the screenshot.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.1
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 9 7940HS w/ Radeon 780M Graphics
Memory: 58.6 GiB of RAM
Graphics Processor: AMD Radeon 780M
Manufacturer: Micro Computer (HK) Tech Limited
Product Name: Venus series
Comment 1 Noah Davis 2024-10-24 22:38:39 UTC
Thanks for the investigation
Comment 2 Bug Janitor Service 2024-10-24 22:39:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/414
Comment 3 Noah Davis 2024-10-26 18:45:22 UTC
Git commit e48ac485c66b5a4d6f1b1502af5b6e18a673901d by Noah Davis.
Committed on 24/10/2024 at 22:40.
Pushed by ndavis into branch 'master'.

Fix negative animation duration without capture on click support

M  +1    -0    src/SpectacleCore.cpp

https://invent.kde.org/graphics/spectacle/-/commit/e48ac485c66b5a4d6f1b1502af5b6e18a673901d
Comment 4 Noah Davis 2024-10-26 18:45:51 UTC
Git commit c9c97ed835216b991c664655230886cb92561a37 by Noah Davis.
Committed on 26/10/2024 at 18:45.
Pushed by ndavis into branch 'release/24.08'.

Fix negative animation duration without capture on click support


(cherry picked from commit e48ac485c66b5a4d6f1b1502af5b6e18a673901d)

Co-authored-by: Noah Davis <noahadvs@gmail.com>

M  +1    -0    src/SpectacleCore.cpp

https://invent.kde.org/graphics/spectacle/-/commit/c9c97ed835216b991c664655230886cb92561a37
Comment 5 Noah Davis 2025-01-29 21:04:25 UTC
*** Bug 487067 has been marked as a duplicate of this bug. ***