!2 修复wayland下无法退出屏保的问题
This commit is contained in:
parent
862792ae2a
commit
f5a274140d
|
@ -364,10 +364,18 @@ void FullBackgroundWidget::setLockState()
|
|||
|
||||
bool FullBackgroundWidget::eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
if(event->type() == QEvent::MouseButtonPress || event->type() == QEvent::MouseMove || event->type() == 6){
|
||||
if(screenStatus & SCREEN_SAVER){
|
||||
clearScreensavers();
|
||||
}
|
||||
}
|
||||
if(event->type() == QEvent::WindowDeactivate){
|
||||
QTimer::singleShot(50,this,SLOT(laterActivate()));
|
||||
}else if(event->type() == QEvent::WindowActivate){
|
||||
PlasmaShellManager::getInstance()->setAppWindowKeepAbove(true);
|
||||
if(QString(qgetenv("XDG_SESSION_TYPE")) == "wayland") {
|
||||
PlasmaShellManager::getInstance()->setAppWindowKeepAbove(true);
|
||||
}
|
||||
|
||||
QTimer::singleShot(500,this,SLOT(setLockState()));
|
||||
QTimer::singleShot(200,this,SLOT(killWindow()));
|
||||
}
|
||||
|
|
|
@ -139,7 +139,6 @@ int main(int argc, char *argv[])
|
|||
checkIslivecd();
|
||||
|
||||
qputenv("QT_QPA_PLATFORMTHEME",QByteArray("ukui"));
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
|
@ -209,7 +208,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
#ifndef USE_INTEL
|
||||
window->show();
|
||||
window->showFullScreen();
|
||||
window->activateWindow();
|
||||
#endif
|
||||
if(parser.isSet(lockOption))
|
||||
|
|
Loading…
Reference in New Issue