Skip to content

Commit 96d2348

Browse files
committed
fix: display auth window when the password need be checked before shutdown or reboot
when the password need be checked before shutdown or reboot, if the lock is showing, need show auth window. Log: display auth window when the password need be checked before shutdown or reboot Pms: BUG-353333 BUG-338545
1 parent 560b536 commit 96d2348

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/widgets/warningcontent.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2015 - 2022 UnionTech Software Technology Co., Ltd.
1+
// SPDX-FileCopyrightText: 2015 - 2026 UnionTech Software Technology Co., Ltd.
22
//
33
// SPDX-License-Identifier: GPL-3.0-or-later
44

@@ -205,8 +205,7 @@ void WarningContent::doAcceptShutdownInhibit()
205205
&& m_model->currentModeState() != SessionBaseModel::ModeStatus::PowerMode
206206
&& m_powerAction != SessionBaseModel::RequireUpdateShutdown
207207
&& m_powerAction != SessionBaseModel::RequireUpdateRestart
208-
&& m_powerAction != SessionBaseModel::RequireShutdown
209-
&& m_powerAction != SessionBaseModel::RequireRestart ) {
208+
&& ((m_powerAction == SessionBaseModel::RequireShutdown || m_powerAction == SessionBaseModel::RequireRestart) && m_model->gsCheckpwd())) {
210209
FullScreenBackground::setContent(LockContent::instance());
211210
m_model->setCurrentContentType(SessionBaseModel::LockContent);
212211
}

0 commit comments

Comments
 (0)