Do not wait for timer if there are no open windows
If there were no open windows KWin would wait until the timer ran out and return false signifying that some windows didnt close. BUG:477573 FIXED-IN:6.0
This commit is contained in:
parent
a705c172ab
commit
ff76c8581d
1 changed files with 7 additions and 0 deletions
|
@ -446,6 +446,13 @@ bool SessionManager::closeWaylandWindows()
|
|||
toplevelWindow->closeWindow();
|
||||
}
|
||||
}
|
||||
|
||||
if (m_pendingWindows.empty()) {
|
||||
m_closingWindowsGuard.reset();
|
||||
QDBusConnection::sessionBus().send(dbusMessage.createReply(true));
|
||||
return true;
|
||||
}
|
||||
|
||||
m_closeTimer.start(std::chrono::seconds(10));
|
||||
m_closeTimer.setSingleShot(true);
|
||||
connect(&m_closeTimer, &QTimer::timeout, m_closingWindowsGuard.get(), [this, dbusMessage] {
|
||||
|
|
Loading…
Reference in a new issue