!19 fixed wayland cannot screenshot top widget
From: @peijiankang Reviewed-by: @tanyulong2021 Signed-off-by: @tanyulong2021
This commit is contained in:
commit
2315130275
39
0005-fixed-wayland-cannot-screenshot-top-widget.patch
Normal file
39
0005-fixed-wayland-cannot-screenshot-top-widget.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From 0fdf762e789c8f530146a5014f873314cce36f15 Mon Sep 17 00:00:00 2001
|
||||||
|
From: peijiankang <peijiankang@kylinos.cn>
|
||||||
|
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<WId> windows = KWindowSystem::windows();
|
||||||
|
QScreen* screen = QApplication::screens().at(0);
|
||||||
|
p =screen->grabWindow(KWindowSystem::activeWindow());
|
||||||
|
ok = true;
|
||||||
|
- }
|
||||||
|
+// }
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
Name: kylin-screenshot
|
Name: kylin-screenshot
|
||||||
Version: 1.0.0
|
Version: 1.0.0
|
||||||
Release: 8
|
Release: 9
|
||||||
Summary: a powerful screenshot and screen recording tool
|
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
|
License: GPL-3.0-or-later and LGPL-3.0-or-later and MIT and Apache-2.0
|
||||||
URL: https://github.com/ubuntukylin
|
URL: https://github.com/ubuntukylin
|
||||||
@ -32,6 +32,8 @@ patch1: 0001-add-save-dialog.patch
|
|||||||
patch2: optimize-the-undo-button-function.patch
|
patch2: optimize-the-undo-button-function.patch
|
||||||
patch3: 0003-change-kylin-screenshot-to-screenshot.patch
|
patch3: 0003-change-kylin-screenshot-to-screenshot.patch
|
||||||
patch4: 0004-add-log.patch
|
patch4: 0004-add-log.patch
|
||||||
|
patch5: 0005-fixed-wayland-cannot-screenshot-top-widget.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Powerful yet simple-to-use screenshot software
|
Powerful yet simple-to-use screenshot software
|
||||||
kylin-screenshot is a powerful screenshot and screen recording tool.
|
kylin-screenshot is a powerful screenshot and screen recording tool.
|
||||||
@ -47,6 +49,7 @@ patch4: 0004-add-log.patch
|
|||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{qmake_qt5} %{_qt5_qmake_flags} CONFIG+=enable-by-default kylin-screenshot.pro
|
%{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
|
%{_datadir}/metainfo/kylinscreenshot.appdata.xml
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 28 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.0-9
|
||||||
|
- fixed wayland cannot screenshot top widget
|
||||||
|
|
||||||
* Mon Jun 27 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.0-8
|
* Mon Jun 27 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.0-8
|
||||||
- add log
|
- add log
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user