diff --git a/0005-fixed-wayland-cannot-screenshot-top-widget.patch b/0005-fixed-wayland-cannot-screenshot-top-widget.patch new file mode 100644 index 0000000..4e2d597 --- /dev/null +++ b/0005-fixed-wayland-cannot-screenshot-top-widget.patch @@ -0,0 +1,39 @@ +From 0fdf762e789c8f530146a5014f873314cce36f15 Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Tue, 28 Jun 2022 09:37:00 +0800 +Subject: [PATCH] fixed wayland cannot screenshot top widget + +--- + src/utils/screengrabber.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/utils/screengrabber.cpp b/src/utils/screengrabber.cpp +index 7fef395..42b9cb3 100755 +--- a/src/utils/screengrabber.cpp ++++ b/src/utils/screengrabber.cpp +@@ -99,7 +99,7 @@ QPixmap ScreenGrabber::grabEntireDesktop(bool &ok) { + + QPixmap ScreenGrabber::grabScreen(int screenNumber, bool &ok) { + QPixmap p; +- bool isVirtual = QApplication::desktop()->isVirtualDesktop(); ++/* bool isVirtual = QApplication::desktop()->isVirtualDesktop(); + if (isVirtual || m_info.waylandDectected()) { + p = grabEntireDesktop(ok); + if (ok) { +@@ -119,11 +119,11 @@ QPixmap ScreenGrabber::grabScreen(int screenNumber, bool &ok) { + p = p.copy(geometry); + } + } +- else { ++ else {*/ + QList windows = KWindowSystem::windows(); + QScreen* screen = QApplication::screens().at(0); + p =screen->grabWindow(KWindowSystem::activeWindow()); + ok = true; +- } ++// } + return p; + } +-- +2.33.0 + diff --git a/kylin-screenshot.spec b/kylin-screenshot.spec index 5dea5e0..2c507b3 100644 --- a/kylin-screenshot.spec +++ b/kylin-screenshot.spec @@ -1,7 +1,7 @@ %define debug_package %{nil} Name: kylin-screenshot Version: 1.0.0 -Release: 8 +Release: 9 Summary: a powerful screenshot and screen recording tool License: GPL-3.0-or-later and LGPL-3.0-or-later and MIT and Apache-2.0 URL: https://github.com/ubuntukylin @@ -32,6 +32,8 @@ patch1: 0001-add-save-dialog.patch patch2: optimize-the-undo-button-function.patch patch3: 0003-change-kylin-screenshot-to-screenshot.patch patch4: 0004-add-log.patch +patch5: 0005-fixed-wayland-cannot-screenshot-top-widget.patch + %description Powerful yet simple-to-use screenshot software kylin-screenshot is a powerful screenshot and screen recording tool. @@ -47,6 +49,7 @@ patch4: 0004-add-log.patch %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build %{qmake_qt5} %{_qt5_qmake_flags} CONFIG+=enable-by-default kylin-screenshot.pro @@ -97,6 +100,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/metainfo/kylinscreenshot.appdata.xml %changelog +* Tue Jun 28 2022 peijiankang - 1.0.0-9 +- fixed wayland cannot screenshot top widget + * Mon Jun 27 2022 peijiankang - 1.0.0-8 - add log