From 5a0c5c389ad6b6a72a50fcfb6746cd7d9811f425 Mon Sep 17 00:00:00 2001 From: borgmanJeremy <46930769+borgmanJeremy@users.noreply.github.com> Date: Fri, 5 Nov 2021 13:33:58 -0500 Subject: [PATCH] Fix KDE Wayland Screenshots (#2045) * testing wayland * clang-format --- data/desktopEntry/package/org.flameshot.Flameshot.desktop | 2 +- src/main.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data/desktopEntry/package/org.flameshot.Flameshot.desktop b/data/desktopEntry/package/org.flameshot.Flameshot.desktop index a726f6b6..8be6b47f 100644 --- a/data/desktopEntry/package/org.flameshot.Flameshot.desktop +++ b/data/desktopEntry/package/org.flameshot.Flameshot.desktop @@ -47,7 +47,7 @@ StartupWMClass=flameshot Actions=Configure;Capture;Launcher; X-DBUS-StartupType=Unique X-DBUS-ServiceName=org.flameshot.Flameshot -X-KDE-DBUS-Restricted-Interfaces=org.kde.kwin.Screenshot +X-KDE-DBUS-Restricted-Interfaces=org.kde.kwin.Screenshot,org.kde.KWin.ScreenShot2 [Desktop Action Configure] Name=Configure diff --git a/src/main.cpp b/src/main.cpp index 90f5f2d0..ba4dd3ae 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -49,7 +49,8 @@ void wayland_hacks() { // Workaround to https://github.com/ksnip/ksnip/issues/416 DesktopInfo info; - if (info.windowManager() == DesktopInfo::GNOME) { + if ((info.windowManager() == DesktopInfo::GNOME) || + (info.windowManager() == DesktopInfo::KDE)) { qputenv("QT_QPA_PLATFORM", "xcb"); } }