Commit c2cae03
fix: use runtime detection for Wayland clipboard (flameshot-org#4497)
When compiled with USE_WAYLAND_CLIPBOARD, the clipboard now works
correctly on both Wayland and X11 sessions.
Previously, builds with USE_WAYLAND_CLIPBOARD=ON would always use
KSystemClipboard, which doesn't work properly when running under X11
(e.g., via XWayland or QT_QPA_PLATFORM=xcb).
This change adds a runtime check for the platform name:
- 'wayland' -> uses KSystemClipboard (KF6 GuiAddons)
- otherwise -> uses QApplication::clipboard() (standard Qt)
This allows distros to ship a single binary that works on both
display servers without requiring separate builds.
Co-authored-by: Benigno Batista Júnior <benigno@opus-software.com.br>1 parent 3ef8f09 commit c2cae03
1 file changed
+10
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
179 | 184 | | |
180 | 185 | | |
181 | 186 | | |
| |||
0 commit comments