!30 bug#I69CSS【锁屏】合盖后重新打开进入锁屏,此时锁屏界面下方图标会被遮住

Merge pull request !30 from liudunfa/openkylin/yangtze
This commit is contained in:
刘远鹏 2023-06-28 09:35:43 +00:00 committed by cckylin-cibot
parent 12653ab034
commit 07ef8ac9a2
4 changed files with 124 additions and 1 deletions

8
debian/changelog vendored
View File

@ -1,3 +1,11 @@
ukui-screensaver (4.0.0.0-ok3~0628) yangtze; urgency=medium
* BUG号bug#I69CSS【锁屏】合盖后重新打开进入锁屏此时锁屏界面下方图标会被遮住
* 需求号:无
* 其他修改说明:无
-- liudun <liudun@kylinos.cn> Wed, 28 Jun 2023 15:05:12 +0800
ukui-screensaver (4.0.0.0-ok3~0608) yangtze; urgency=medium
* BUG号

4
debian/control vendored
View File

@ -30,7 +30,8 @@ Build-Depends: debhelper-compat (= 12),
libkysdk-sysinfo-dev (>> 1.1.0kylin1),
ukui-input-gather (>=1.0.0.2),
libinput-dev,
libukuiinputgatherclient-dev
libukuiinputgatherclient-dev,
layer-shell-qt
Standards-Version: 4.5.0
Rules-Requires-Root: no
Homepage: https://www.github.com/ukui/ukui-screensaver
@ -44,6 +45,7 @@ Depends: ethtool,
ukui-session-manager,
libpam-biometric(>=3.20.0.10),
ukui-input-gather(>=1.0.0.2),
layer-shell-qt,
${misc:Depends},
${shlibs:Depends}
Replaces: ukui-screensaver-common (<< 2.0.0)

112
debian/patches/0003-30-bug-I69CSS.patch vendored Normal file
View File

@ -0,0 +1,112 @@
From: =?utf-8?b?5YiY6L+c6bmP?=
<11195448+liuyuanpeng176@user.noreply.gitee.com>
Date: Wed, 28 Jun 2023 09:35:43 +0000
Subject: =?utf-8?b?ITMwIGJ1ZyNJNjlDU1PjgJDplIHlsY/jgJHlkIjnm5blkI7ph43mlrA=?=
=?utf-8?b?5omT5byA6L+b5YWl6ZSB5bGP77yM5q2k5pe26ZSB5bGP55WM6Z2i5LiL5pa55Zu+?=
=?utf-8?b?5qCH5Lya6KKr6YGu5L2PIE1lcmdlIHB1bGwgcmVxdWVzdCAhMzAgZnJvbSBsaXVk?=
=?utf-8?b?dW5mYS9vcGVua3lsaW4veWFuZ3R6ZQ==?=
---
CMakeLists.txt | 1 +
src/CMakeLists.txt | 1 +
src/fullbackgroundwidget.cpp | 12 ++++++------
src/ukui-screensaver-dialog.cpp | 17 +++++++++++++----
4 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0aa1a46..2a8cc61 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,6 +7,7 @@ find_package(OpenCV REQUIRED)
find_package(PkgConfig)
find_package(KF5Screen REQUIRED)
find_package(KF5Wayland REQUIRED)
+find_package(LayerShellQt REQUIRED)
pkg_check_modules(GIOUNIX2 REQUIRED gio-unix-2.0)
pkg_check_modules(GLIB2 REQUIRED glib-2.0 gio-2.0)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d22a516..c30a4e9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -199,6 +199,7 @@ target_link_libraries(ukui-screensaver-dialog
opencv_imgcodecs
opencv_imgproc
opencv_core
+ LayerShellQt::Interface
)
link_libraries(libmatemixer.so glib-2.0.so)
diff --git a/src/fullbackgroundwidget.cpp b/src/fullbackgroundwidget.cpp
index ae7695d..5ab2976 100644
--- a/src/fullbackgroundwidget.cpp
+++ b/src/fullbackgroundwidget.cpp
@@ -365,9 +365,9 @@ bool FullBackgroundWidget::eventFilter(QObject *obj, QEvent *event)
if(event->type() == QEvent::WindowDeactivate){
QTimer::singleShot(50,this,SLOT(laterActivate()));
}else if(event->type() == QEvent::WindowActivate){
- if(QString(qgetenv("XDG_SESSION_TYPE")) == "wayland" && !QX11Info::isPlatformX11()) {
- PlasmaShellManager::getInstance()->setAppWindowKeepAbove(true);
- }
+// if(QString(qgetenv("XDG_SESSION_TYPE")) == "wayland" && !QX11Info::isPlatformX11()) {
+// PlasmaShellManager::getInstance()->setAppWindowKeepAbove(true);
+// }
QTimer::singleShot(500,this,SLOT(setLockState()));
QTimer::singleShot(200,this,SLOT(killWindow()));
@@ -1222,9 +1222,9 @@ void FullBackgroundWidget::onDesktopResized()
update();
#endif
- if(QString(qgetenv("XDG_SESSION_TYPE")) == "wayland" && !QX11Info::isPlatformX11() ) {
- PlasmaShellManager::getInstance()->setPos(this->windowHandle(),QPoint(0,0));
- }
+// if(QString(qgetenv("XDG_SESSION_TYPE")) == "wayland" && !QX11Info::isPlatformX11() ) {
+// PlasmaShellManager::getInstance()->setPos(this->windowHandle(),QPoint(0,0));
+// }
}
void FullBackgroundWidget::laterInhibit(bool val)
diff --git a/src/ukui-screensaver-dialog.cpp b/src/ukui-screensaver-dialog.cpp
index 9443b8a..8626b4c 100644
--- a/src/ukui-screensaver-dialog.cpp
+++ b/src/ukui-screensaver-dialog.cpp
@@ -45,6 +45,7 @@
#define MAX_FILE_SIZE 1024 * 1024
#define LOG_FILE0 "screensaver_0.log"
#define LOG_FILE1 "screensaver_1.log"
+#include <LayerShellQt/Shell>
#define GSETTINGS_SCHEMA_SCREENSAVER "org.ukui.screensaver"
#define KEY_LOCK_ENABLED "lock-enabled"
@@ -131,6 +132,8 @@ void handler(int signum)
#define WORKING_DIRECTORY "/usr/share/ukui-screensaver"
int main(int argc, char *argv[])
{
+ LayerShellQt::Shell::useLayerShell();
+
if(argc < 2)
return 0;
@@ -301,11 +304,17 @@ int main(int argc, char *argv[])
if(QString(qgetenv("XDG_SESSION_TYPE")) == "wayland" && !QX11Info::isPlatformX11()) {
isWayland = true;
}
- if (isWayland){
- PlasmaShellManager::getInstance();
- PlasmaShellManager::getInstance()->setAppWindowKeepAbove(true);
+// if (isWayland){
+// PlasmaShellManager::getInstance();
+// PlasmaShellManager::getInstance()->setAppWindowKeepAbove(true);
+// }
+ if (isWayland) {
+ if (auto layerShellWindow = LayerShellQt::Window::get(window->windowHandle())) {
+ layerShellWindow->setExclusiveZone(-1);
+ layerShellWindow->setLayer(LayerShellQt::Window::LayerOverlay);
+ layerShellWindow->setKeyboardInteractivity(LayerShellQt::Window::KeyboardInteractivityExclusive);
+ }
}
-
QString username = getenv("USER");
int uid = getuid();
QDBusInterface *interface = new QDBusInterface("cn.kylinos.Kydroid2",

View File

@ -1,2 +1,3 @@
0001-update-changelog.patch
0002-update-changelog.patch
0003-30-bug-I69CSS.patch