From 014e2076ec38129d39690a9c2d8e54613feaba8f Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Tue, 17 Feb 2026 20:13:35 -0500 Subject: [PATCH] quicksettings/screenshot: Fix shell not showing up and update dbus Use hide-caller-windows from https://invent.kde.org/plasma/kwin/-/merge_requests/8832 to avoid plasmashell being hidden (by https://invent.kde.org/plasma/kwin/-/merge_requests/8338). --- .../dbus/org.kde.KWin.ScreenShot2.xml | 174 ++++++++++++++++++ quicksettings/screenshot/screenshotutil.cpp | 1 + 2 files changed, 175 insertions(+) diff --git a/quicksettings/screenshot/dbus/org.kde.KWin.ScreenShot2.xml b/quicksettings/screenshot/dbus/org.kde.KWin.ScreenShot2.xml index 34c03b2c..bf515f28 100644 --- a/quicksettings/screenshot/dbus/org.kde.KWin.ScreenShot2.xml +++ b/quicksettings/screenshot/dbus/org.kde.KWin.ScreenShot2.xml @@ -14,6 +14,13 @@ a screen, or a window. --> + + + @@ -56,6 +70,55 @@ + + + + + + + + + @@ -132,6 +198,11 @@ image type is "raw" * "format" (u): The image format, as defined in QImage::Format. Available only if the image type is "raw" + * "screen" (s): The name of the captured screen, same as QScreen::name(). + Available since version 4 + * "scale" (d): The ratio between the native size and the logical + size of the contents, corresponds to QImage::devicePixelRatio(). + Available since version 4. --> @@ -142,6 +213,51 @@ + + + + + + + + + @@ -180,5 +311,48 @@ + + + + + + + + + diff --git a/quicksettings/screenshot/screenshotutil.cpp b/quicksettings/screenshot/screenshotutil.cpp index f93dd2ec..7ce6c39b 100644 --- a/quicksettings/screenshot/screenshotutil.cpp +++ b/quicksettings/screenshot/screenshotutil.cpp @@ -88,6 +88,7 @@ void ScreenShotUtil::takeScreenShot() // We don't have access to the ScreenPool so we'll just take the first screen QVariantMap options; options.insert(QStringLiteral("native-resolution"), true); + options.insert(QStringLiteral("hide-caller-windows"), false); auto pendingCall = m_screenshotInterface->CaptureScreen(qGuiApp->screens().constFirst()->name(), options, QDBusUnixFileDescriptor(lPipeFds[1])); close(lPipeFds[1]);