!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 Gitee
commit d5dfb48e55
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 32 additions and 11 deletions

View File

@ -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)

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)

View File

@ -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)

View File

@ -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)

View File

@ -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",