Skip to content

Commit a711d9f

Browse files
committed
fix: Fix displaying lock screen window when shutdown from inhibit warning page
When clicking shutdown button from the inhibit warning page, doAcceptShutdownInhibit() would switch back to LockContent, causing a brief flash of the lock screen password page. Add RequireShutdown and RequireRestart to the exclusion conditions to prevent unnecessary content switching during shutdown/restart. Log: 修复从关机阻塞页面点击关机按钮会显示锁屏密码页面的问题 Pms: BUG-338545
1 parent 2c6d449 commit a711d9f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/widgets/warningcontent.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@ void WarningContent::doAcceptShutdownInhibit()
204204
if (m_model->currentModeState() != SessionBaseModel::ModeStatus::ShutDownMode
205205
&& m_model->currentModeState() != SessionBaseModel::ModeStatus::PowerMode
206206
&& m_powerAction != SessionBaseModel::RequireUpdateShutdown
207-
&& m_powerAction != SessionBaseModel::RequireUpdateRestart ) {
207+
&& m_powerAction != SessionBaseModel::RequireUpdateRestart
208+
&& m_powerAction != SessionBaseModel::RequireShutdown
209+
&& m_powerAction != SessionBaseModel::RequireRestart ) {
208210
FullScreenBackground::setContent(LockContent::instance());
209211
m_model->setCurrentContentType(SessionBaseModel::LockContent);
210212
}

0 commit comments

Comments
 (0)