40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
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
|
|
|