feat(slock): intentionally protocol error if lock is destroyed
This commit is contained in:
parent
a255889e5c
commit
cdd5729642
2 changed files with 7 additions and 1 deletions
|
|
@ -13,7 +13,12 @@ QSWaylandSessionLock::QSWaylandSessionLock(
|
|||
this->init(lock); // if isInitialized is false that means we already unlocked.
|
||||
}
|
||||
|
||||
QSWaylandSessionLock::~QSWaylandSessionLock() { this->unlock(); }
|
||||
QSWaylandSessionLock::~QSWaylandSessionLock() {
|
||||
if (this->isInitialized()) {
|
||||
// This will intentionally lock the session if the lock is destroyed without calling unlock.
|
||||
this->destroy();
|
||||
}
|
||||
}
|
||||
|
||||
void QSWaylandSessionLock::unlock() {
|
||||
if (this->isInitialized()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue