SIGN IN SIGN UP
flameshot-org / flameshot UNCLAIMED

Powerful yet simple to use screenshot software :desktop_computer: :camera_flash:

0 0 70 C++

Fix copy failure on GNOME via GUI (#4363)

* Fix copy failure on GNOME
My suspicion is that GNOME and specifically Mutter requires specific trusted context for the QtClipboard (from 'kf.guiaddons: Could not init WaylandClipboard, falling back to QtClipboard.') clipboard operation. This means that a visible window must provide the clipboard data. Since the daemon has no visible window, this is a workaround that makes the 'flameshot gui' window handle the copying with a slight delay using QTimer to ensure that GNOME has requested the clipboard data and saved it.

This seems like a better solution #4355 as no helper windows are needed, since we already have the 'flameshot gui' window and can use it. I've limited it to GNOME only as I cannot easily test in other environments.

Fixes #4116, #4298

* Keep capture window alive until GNOME fetches clipboard data

* Move the GNOME clipboard workaround in screenshotsaver.cpp

* Log GNOME clipboard timeout and restore success notification

* Apply linter fixes
N
no7076 committed
535032b17336fd3b6cb2f2322907a038926b9988
Parent: d54096e
Committed by GitHub <noreply@github.com> on 11/28/2025, 4:43:41 PM