From 3f8845a6a741a2a6532ef4b15d731b82224fb62c Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 29 May 2022 00:00:47 +0200 Subject: Added an exit dispatcher and no more SIGSEGV on exit --- src/managers/KeybindManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index f37c853f..f2efb29b 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -20,6 +20,7 @@ CKeybindManager::CKeybindManager() { m_mDispatchers["focusmonitor"] = focusMonitor; m_mDispatchers["movecursortocorner"] = moveCursorToCorner; m_mDispatchers["workspaceopt"] = workspaceOpt; + m_mDispatchers["exit"] = exitHyprland; } void CKeybindManager::addKeybind(SKeybind kb) { @@ -674,4 +675,9 @@ void CKeybindManager::workspaceOpt(std::string args) { // recalc mon g_pLayoutManager->getCurrentLayout()->recalculateMonitor(g_pCompositor->m_pLastMonitor->ID); +} + +void CKeybindManager::exitHyprland(std::string argz) { + g_pCompositor->cleanupExit(); + exit(0); } \ No newline at end of file -- cgit v1.2.3