Merge pull request !87 from 杨敏/openkylin/nile
This commit is contained in:
杨敏 2024-06-05 08:23:06 +00:00 committed by Gitee
commit f3e77d31bf
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 3 additions and 4 deletions

View File

@ -133,9 +133,6 @@ void FullBackgroundWidget::initUI()
}
setWindowFlags(Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint);
QTimer::singleShot(100, this, [=]() {
WindowManager::setWindowLayer(this->windowHandle(), WindowLayer::ScreenLock);
});
// 登录模式下监听屏幕插拔
if (isGreeterMode()) {
@ -170,6 +167,9 @@ bool FullBackgroundWidget::eventFilter(QObject *obj, QEvent *event)
}
QTimer::singleShot(500, this, SLOT(setLockState()));
// QTimer::singleShot(200,this,SLOT(killWindow()));
} else if (event->type() == QEvent::Show || event->type() == QEvent::UpdateRequest) {
WindowManager::setWindowLayer(this->windowHandle(), WindowLayer::ScreenLock);
//qDebug()<<"Set window layer ScreenLock";
}
return QWidget::eventFilter(obj, event);
}
@ -637,7 +637,6 @@ void FullBackgroundWidget::showEvent(QShowEvent *event)
if (QX11Info::isPlatformX11())
tryGrabKeyboard();
QTimer::singleShot(100, this, [=]() {
WindowManager::setWindowLayer(this->windowHandle(), WindowLayer::ScreenLock);
m_lockWidget->updateFont();
m_lockWidget->updateFontSize();
});