diff --git a/libkworkspace/sessionmanagement.cpp b/libkworkspace/sessionmanagement.cpp --- a/libkworkspace/sessionmanagement.cpp +++ b/libkworkspace/sessionmanagement.cpp @@ -62,6 +62,8 @@ connect(backend, &SessionBackend::canSuspendChanged, this, &SessionManagement::canSuspendChanged); connect(backend, &SessionBackend::canHybridSuspendChanged, this, &SessionManagement::canHybridSuspendChanged); connect(backend, &SessionBackend::canHibernateChanged, this, &SessionManagement::canHibernateChanged); + connect(backend, &SessionBackend::aboutToSuspend, this, &SessionManagement::aboutToSuspend); + connect(backend, &SessionBackend::resumingFromSuspend, this, &SessionManagement::resumingFromSuspend); } bool SessionManagement::canShutdown() const diff --git a/lookandfeel/contents/lockscreen/LockScreenUi.qml b/lookandfeel/contents/lockscreen/LockScreenUi.qml --- a/lookandfeel/contents/lockscreen/LockScreenUi.qml +++ b/lookandfeel/contents/lockscreen/LockScreenUi.qml @@ -57,6 +57,17 @@ } } + SessionManagement { + id: sessionManagement + } + + Connections { + target: sessionManagement + onAboutToSuspend: { + mainBlock.mainPasswordBox.text = ""; + } + } + SessionsModel { id: sessionsModel showNewSessionEntry: false