core: improve cleanup logic
This commit is contained in:
parent
9f20a15955
commit
5eeec8860e
8 changed files with 95 additions and 23 deletions
|
|
@ -1455,7 +1455,7 @@ void CKeybindManager::renameWorkspace(std::string args) {
|
|||
}
|
||||
|
||||
void CKeybindManager::exitHyprland(std::string argz) {
|
||||
g_pCompositor->cleanup();
|
||||
g_pInputManager->m_bExitTriggered = true;
|
||||
}
|
||||
|
||||
void CKeybindManager::moveCurrentWorkspaceToMonitor(std::string args) {
|
||||
|
|
|
|||
|
|
@ -1185,6 +1185,9 @@ void CInputManager::onKeyboardKey(wlr_keyboard_key_event* e, SKeyboard* pKeyboar
|
|||
|
||||
updateKeyboardsLeds(pKeyboard->keyboard);
|
||||
}
|
||||
|
||||
if (m_bExitTriggered)
|
||||
g_pCompositor->cleanup();
|
||||
}
|
||||
|
||||
void CInputManager::onKeyboardMod(void* data, SKeyboard* pKeyboard) {
|
||||
|
|
|
|||
|
|
@ -243,6 +243,8 @@ class CInputManager {
|
|||
|
||||
void restoreCursorIconToApp(); // no-op if restored
|
||||
|
||||
bool m_bExitTriggered = false; // for exit dispatcher
|
||||
|
||||
friend class CKeybindManager;
|
||||
friend class CWLSurface;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue