From c40ef59a3570e2d80a0b15131e6964c3c5e14408 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 4 Jul 2022 16:51:42 +0200 Subject: support monitor names in moving workspaces --- src/managers/KeybindManager.cpp | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index cb091c9f..d26b0e92 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -793,15 +793,16 @@ void CKeybindManager::exitHyprland(std::string argz) { } void CKeybindManager::moveCurrentWorkspaceToMonitor(std::string args) { - if (!isNumber(args) && !isDirection(args)) { - Debug::log(ERR, "moveCurrentWorkspaceToMonitor arg not a number or direction!"); - return; - } - - const auto PMONITOR = isDirection(args) ? g_pCompositor->getMonitorInDirection(args[0]) : g_pCompositor->getMonitorFromID(std::stoi(args)); + SMonitor* PMONITOR = nullptr; - if (!PMONITOR) { - Debug::log(ERR, "Ignoring moveCurrentWorkspaceToMonitor: monitor doesnt exist"); + try { + if (!isNumber(args) && !isDirection(args)) { + PMONITOR = g_pCompositor->getMonitorFromName(args); + } else { + PMONITOR = isDirection(args) ? g_pCompositor->getMonitorInDirection(args[0]) : g_pCompositor->getMonitorFromID(std::stoi(args)); + } + } catch (std::exception& e) { + Debug::log(LOG, "moveCurrentWorkspaceToMonitor: caught exception in monitor", e.what()); return; } @@ -821,12 +822,19 @@ void CKeybindManager::moveWorkspaceToMonitor(std::string args) { std::string workspace = args.substr(0, args.find_first_of(' ')); std::string monitor = args.substr(args.find_first_of(' ') + 1); - if (!isNumber(monitor) && !isDirection(monitor)) { - Debug::log(ERR, "moveWorkspaceToMonitor monitor arg not a number or direction!"); + SMonitor* PMONITOR = nullptr; + + try { + if (!isNumber(monitor) && !isDirection(monitor)) { + PMONITOR = g_pCompositor->getMonitorFromName(monitor); + } else { + PMONITOR = isDirection(monitor) ? g_pCompositor->getMonitorInDirection(monitor[0]) : g_pCompositor->getMonitorFromID(std::stoi(monitor)); + } + } catch (std::exception& e) { + Debug::log(LOG, "moveWorkspaceToMonitor: caught exception in monitor", e.what()); return; } - - const auto PMONITOR = isDirection(monitor) ? g_pCompositor->getMonitorInDirection(monitor[0]) : g_pCompositor->getMonitorFromID(std::stoi(monitor)); + if (!PMONITOR){ Debug::log(ERR, "Ignoring moveWorkspaceToMonitor: monitor doesnt exist"); -- cgit v1.2.3 From 9742ac7596b83025c7ab0cf4e92d9db347b4b5c3 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 4 Jul 2022 19:41:55 +0200 Subject: attempt to fix a specialworkspace crash --- src/managers/KeybindManager.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index d26b0e92..061f60a9 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -890,11 +890,16 @@ void CKeybindManager::toggleSpecialWorkspace(std::string args) { } } } else { + auto PSPECIALWORKSPACE = g_pCompositor->getWorkspaceByID(SPECIAL_WORKSPACE_ID); + + if (!PSPECIALWORKSPACE) { + // ??? happens sometimes...? + PSPECIALWORKSPACE = g_pCompositor->m_vWorkspaces.emplace_back(std::make_unique(g_pCompositor->m_pLastMonitor->ID, "special", true)).get(); + } + g_pCompositor->m_pLastMonitor->specialWorkspaceOpen = true; g_pLayoutManager->getCurrentLayout()->recalculateMonitor(g_pCompositor->m_pLastMonitor->ID); - const auto PSPECIALWORKSPACE = g_pCompositor->getWorkspaceByID(SPECIAL_WORKSPACE_ID); - PSPECIALWORKSPACE->startAnim(true, true); PSPECIALWORKSPACE->m_iMonitorID = g_pCompositor->m_pLastMonitor->ID; } -- cgit v1.2.3 From cc8b8f595fa5c20b394394fe777451d4873608b3 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 4 Jul 2022 19:58:51 +0200 Subject: disallow workspace special windowrule --- src/managers/KeybindManager.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 061f60a9..4ecf792e 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -891,12 +891,7 @@ void CKeybindManager::toggleSpecialWorkspace(std::string args) { } } else { auto PSPECIALWORKSPACE = g_pCompositor->getWorkspaceByID(SPECIAL_WORKSPACE_ID); - - if (!PSPECIALWORKSPACE) { - // ??? happens sometimes...? - PSPECIALWORKSPACE = g_pCompositor->m_vWorkspaces.emplace_back(std::make_unique(g_pCompositor->m_pLastMonitor->ID, "special", true)).get(); - } - + g_pCompositor->m_pLastMonitor->specialWorkspaceOpen = true; g_pLayoutManager->getCurrentLayout()->recalculateMonitor(g_pCompositor->m_pLastMonitor->ID); -- cgit v1.2.3 From 239aa2cec4373f45ca55be74d5768b42abf1e749 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 6 Jul 2022 11:02:21 +0200 Subject: fix internal workspace changes being clamped --- src/managers/KeybindManager.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 4ecf792e..f5ec0e48 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -253,7 +253,14 @@ void CKeybindManager::changeworkspace(std::string args) { int workspaceToChangeTo = 0; std::string workspaceName = ""; - workspaceToChangeTo = getWorkspaceIDFromString(args, workspaceName); + if (args.find("[internal]") == 0) { + workspaceToChangeTo = std::stoi(args.substr(10)); + const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(workspaceToChangeTo); + if (PWORKSPACE) + workspaceName = PWORKSPACE->m_szName; + } else { + workspaceToChangeTo = getWorkspaceIDFromString(args, workspaceName); + } if (workspaceToChangeTo == INT_MAX) { Debug::log(ERR, "Error in changeworkspace, invalid value"); @@ -451,7 +458,7 @@ void CKeybindManager::moveActiveToWorkspace(std::string args) { // undo the damage if we are moving to the special workspace if (WORKSPACEID == SPECIAL_WORKSPACE_ID) { - changeworkspace(std::to_string(OLDWORKSPACE->m_iID)); + changeworkspace("[internal]" + std::to_string(OLDWORKSPACE->m_iID)); OLDWORKSPACE->startAnim(true, true, true); toggleSpecialWorkspace(""); g_pCompositor->getWorkspaceByID(SPECIAL_WORKSPACE_ID)->startAnim(false, false, true); @@ -503,8 +510,8 @@ void CKeybindManager::moveActiveToWorkspaceSilent(std::string args) { PWORKSPACE = g_pCompositor->getWorkspaceByID(workspaceToMoveTo); - changeworkspace(std::to_string(OLDWORKSPACEIDONMONITOR)); - changeworkspace(std::to_string(OLDWORKSPACEIDRETURN)); + changeworkspace("[internal]" + std::to_string(OLDWORKSPACEIDONMONITOR)); + changeworkspace("[internal]" + std::to_string(OLDWORKSPACEIDRETURN)); // revert animations PWORKSPACE->m_vRenderOffset.setValueAndWarp(Vector2D(0,0)); @@ -663,7 +670,7 @@ void CKeybindManager::focusMonitor(std::string arg) { } if (monID > -1 && monID < (int)g_pCompositor->m_vMonitors.size()) { - changeworkspace(std::to_string(g_pCompositor->getMonitorFromID(monID)->activeWorkspace)); + changeworkspace("[internal]" + std::to_string(g_pCompositor->getMonitorFromID(monID)->activeWorkspace)); } else { Debug::log(ERR, "Error in focusMonitor: invalid arg 1"); } @@ -683,7 +690,7 @@ void CKeybindManager::focusMonitor(std::string arg) { } else { for (auto& m : g_pCompositor->m_vMonitors) { if (m->szName == arg) { - changeworkspace(std::to_string(m->activeWorkspace)); + changeworkspace("[internal]" + std::to_string(m->activeWorkspace)); return; } } @@ -1051,7 +1058,7 @@ void CKeybindManager::focusWindow(std::string regexp) { Debug::log(LOG, "Focusing to window name: %s", w->m_szTitle.c_str()); - changeworkspace(std::to_string(w->m_iWorkspaceID)); + changeworkspace("[internal]" + std::to_string(w->m_iWorkspaceID)); g_pCompositor->focusWindow(w.get()); -- cgit v1.2.3 From f9756d10d4d1c5ea7737cf3a237b1f966d6b7a01 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 6 Jul 2022 16:50:11 +0200 Subject: changed C++ std to C++23, use std::string::contains --- src/managers/KeybindManager.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index f5ec0e48..d33cd0b6 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -49,21 +49,21 @@ void CKeybindManager::removeKeybind(uint32_t mod, const std::string& key) { uint32_t CKeybindManager::stringToModMask(std::string mods) { uint32_t modMask = 0; - if (mods.find("SHIFT") != std::string::npos) + if (mods.contains("SHIFT")) modMask |= WLR_MODIFIER_SHIFT; - if (mods.find("CAPS") != std::string::npos) + if (mods.contains("CAPS")) modMask |= WLR_MODIFIER_CAPS; - if (mods.find("CTRL") != std::string::npos || mods.find("CONTROL") != std::string::npos) + if (mods.contains("CTRL") || mods.contains("CONTROL")) modMask |= WLR_MODIFIER_CTRL; - if (mods.find("ALT") != std::string::npos) + if (mods.contains("ALT")) modMask |= WLR_MODIFIER_ALT; - if (mods.find("MOD2") != std::string::npos) + if (mods.contains("MOD2")) modMask |= WLR_MODIFIER_MOD2; - if (mods.find("MOD3") != std::string::npos) + if (mods.contains("MOD3")) modMask |= WLR_MODIFIER_MOD3; - if (mods.find("SUPER") != std::string::npos || mods.find("WIN") != std::string::npos || mods.find("LOGO") != std::string::npos || mods.find("MOD4") != std::string::npos) + if (mods.contains("SUPER") || mods.contains("WIN") || mods.contains("LOGO") || mods.contains("MOD4")) modMask |= WLR_MODIFIER_LOGO; - if (mods.find("MOD5") != std::string::npos) + if (mods.contains("MOD5")) modMask |= WLR_MODIFIER_MOD5; return modMask; @@ -823,7 +823,7 @@ void CKeybindManager::moveCurrentWorkspaceToMonitor(std::string args) { } void CKeybindManager::moveWorkspaceToMonitor(std::string args) { - if (args.find_first_of(' ') == std::string::npos) + if (!args.contains(' ')) return; std::string workspace = args.substr(0, args.find_first_of(' ')); @@ -925,7 +925,7 @@ void CKeybindManager::forceRendererReload(std::string args) { } void CKeybindManager::resizeActive(std::string args) { - if (args.find_first_of(' ') == std::string::npos) + if (!args.contains(' ')) return; std::string x = args.substr(0, args.find_first_of(' ')); @@ -974,7 +974,7 @@ void CKeybindManager::resizeActive(std::string args) { } void CKeybindManager::moveActive(std::string args) { - if (args.find_first_of(' ') == std::string::npos) + if (!args.contains(' ')) return; std::string x = args.substr(0, args.find_first_of(' ')); -- cgit v1.2.3 From a7b595d9684814285bd71089f500f60b351a00f2 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 7 Jul 2022 19:01:42 +0200 Subject: allow windowrule special again --- src/managers/KeybindManager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index d33cd0b6..7f9bb39a 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -898,7 +898,12 @@ void CKeybindManager::toggleSpecialWorkspace(std::string args) { } } else { auto PSPECIALWORKSPACE = g_pCompositor->getWorkspaceByID(SPECIAL_WORKSPACE_ID); - + + if (!PSPECIALWORKSPACE) { + // ??? happens sometimes...? + PSPECIALWORKSPACE = g_pCompositor->m_vWorkspaces.emplace_back(std::make_unique(g_pCompositor->m_pLastMonitor->ID, "special", true)).get(); + } + g_pCompositor->m_pLastMonitor->specialWorkspaceOpen = true; g_pLayoutManager->getCurrentLayout()->recalculateMonitor(g_pCompositor->m_pLastMonitor->ID); -- cgit v1.2.3 From aa3bc653423a06f53d8ad2cbfc86d70dfc2710b4 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 7 Jul 2022 19:16:16 +0200 Subject: fix special status when workspace is changed --- src/managers/KeybindManager.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 7f9bb39a..ce99030e 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -284,8 +284,6 @@ void CKeybindManager::changeworkspace(std::string args) { const auto OLDWORKSPACEID = PMONITOR->activeWorkspace; // change it - PMONITOR->specialWorkspaceOpen = false; - if (workspaceToChangeTo != SPECIAL_WORKSPACE_ID) PMONITOR->activeWorkspace = workspaceToChangeTo; else -- cgit v1.2.3 From cd0a01f4de6e1489caa35bece331c81dbaab2587 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 8 Jul 2022 09:27:17 +0200 Subject: Added binding by keycodes --- src/managers/KeybindManager.cpp | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index ce99030e..bb66e83d 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -69,7 +69,7 @@ uint32_t CKeybindManager::stringToModMask(std::string mods) { return modMask; } -bool CKeybindManager::handleKeybinds(const uint32_t& modmask, const xkb_keysym_t& key) { +bool CKeybindManager::handleKeybinds(const uint32_t& modmask, const xkb_keysym_t& key, const int& keycode) { bool found = false; if (handleInternalKeybinds(key)) @@ -82,15 +82,24 @@ bool CKeybindManager::handleKeybinds(const uint32_t& modmask, const xkb_keysym_t if (modmask != k.modmask || (g_pCompositor->m_sSeat.exclusiveClient && !k.locked) || k.submap != m_szCurrentSelectedSubmap) continue; - // oMg such performance hit!!11! - // this little maneouver is gonna cost us 4µs - const auto KBKEY = xkb_keysym_from_name(k.key.c_str(), XKB_KEYSYM_CASE_INSENSITIVE); - const auto KBKEYUPPER = xkb_keysym_to_upper(KBKEY); - // small TODO: fix 0-9 keys and other modified ones with shift - - if (key != KBKEY && key != KBKEYUPPER) - continue; + if (k.keycode != -1) { + if (keycode != k.keycode) + continue; + + } else { + if (key == 0) + continue; // this is a keycode check run + + // oMg such performance hit!!11! + // this little maneouver is gonna cost us 4µs + const auto KBKEY = xkb_keysym_from_name(k.key.c_str(), XKB_KEYSYM_CASE_INSENSITIVE); + const auto KBKEYUPPER = xkb_keysym_to_upper(KBKEY); + // small TODO: fix 0-9 keys and other modified ones with shift + + if (key != KBKEY && key != KBKEYUPPER) + continue; + } const auto DISPATCHER = m_mDispatchers.find(k.handler); @@ -99,7 +108,7 @@ bool CKeybindManager::handleKeybinds(const uint32_t& modmask, const xkb_keysym_t Debug::log(ERR, "Inavlid handler in a keybind! (handler %s does not exist)", k.handler.c_str()); } else { // call the dispatcher - Debug::log(LOG, "Keybind triggered, calling dispatcher (%d, %d)", modmask, KBKEYUPPER); + Debug::log(LOG, "Keybind triggered, calling dispatcher (%d, %d)", modmask, key); DISPATCHER->second(k.arg); } -- cgit v1.2.3 From 46306e59eb4c393ab96231139bb45b888f274e7c Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 8 Jul 2022 09:32:09 +0200 Subject: added keycode support to unbind --- src/managers/KeybindManager.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index bb66e83d..9fed911b 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -41,8 +41,21 @@ void CKeybindManager::addKeybind(SKeybind kb) { void CKeybindManager::removeKeybind(uint32_t mod, const std::string& key) { for (auto it = m_lKeybinds.begin(); it != m_lKeybinds.end(); ++it) { - if (it->modmask == mod && it->key == key) { + if (isNumber(key) && std::stoi(key) > 9) { + const auto KEYNUM = std::stoi(key); + + if (it->modmask == mod && it->keycode == KEYNUM) { + it = m_lKeybinds.erase(it); + + if (it == m_lKeybinds.end()) + break; + } + } + else if (it->modmask == mod && it->key == key) { it = m_lKeybinds.erase(it); + + if (it == m_lKeybinds.end()) + break; } } } -- cgit v1.2.3 From e6872bddf4c78ebaddbc3de2aa073afc948faf6b Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 8 Jul 2022 21:52:52 +0200 Subject: fix minor issues with floating windows and fullscreen --- src/managers/KeybindManager.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 9fed911b..13bdf1e4 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -253,9 +253,6 @@ void CKeybindManager::toggleActiveFloating(std::string args) { moveActiveToWorkspace(std::to_string(g_pCompositor->getMonitorFromID(ACTIVEWINDOW->m_iMonitorID)->activeWorkspace)); } - ACTIVEWINDOW->m_vRealPosition.setValue(ACTIVEWINDOW->m_vRealPosition.vec() + Vector2D(5, 5)); - ACTIVEWINDOW->m_vSize = ACTIVEWINDOW->m_vRealPosition.vec() - Vector2D(10, 10); - g_pLayoutManager->getCurrentLayout()->changeWindowFloatingMode(ACTIVEWINDOW); } } -- cgit v1.2.3 From c44cafda9723e268dcedd71eb2f9b918429bbd0f Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 9 Jul 2022 18:39:41 +0200 Subject: added cyclenext param previous --- src/managers/KeybindManager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 13bdf1e4..348f0655 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -1044,11 +1044,14 @@ void CKeybindManager::moveActive(std::string args) { g_pLayoutManager->getCurrentLayout()->moveActiveWindow(Vector2D(X, Y)); } -void CKeybindManager::circleNext(std::string) { +void CKeybindManager::circleNext(std::string arg) { if (!g_pCompositor->windowValidMapped(g_pCompositor->m_pLastWindow)) return; - g_pCompositor->focusWindow(g_pCompositor->getNextWindowOnWorkspace(g_pCompositor->m_pLastWindow)); + if (arg == "last" || arg == "l" || arg == "prev" || arg == "p") + g_pCompositor->focusWindow(g_pCompositor->getPrevWindowOnWorkspace(g_pCompositor->m_pLastWindow)); + else + g_pCompositor->focusWindow(g_pCompositor->getNextWindowOnWorkspace(g_pCompositor->m_pLastWindow)); const auto MIDPOINT = g_pCompositor->m_pLastWindow->m_vRealPosition.goalv() + g_pCompositor->m_pLastWindow->m_vRealSize.goalv() / 2.f; -- cgit v1.2.3 From 6708f3b1334e8b6a966f424fe04713a4e74d5fdb Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Wed, 13 Jul 2022 18:18:23 +0200 Subject: Fixed TTY switching (#364) --- src/managers/KeybindManager.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 348f0655..60e4cdd6 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -140,11 +140,11 @@ bool CKeybindManager::handleVT(xkb_keysym_t keysym) { if (PSESSION) { const int TTY = keysym - XKB_KEY_XF86Switch_VT_1 + 1; wlr_session_change_vt(PSESSION, TTY); + g_pCompositor->m_bSessionActive = false; for (auto& m : g_pCompositor->m_vMonitors) { - g_pHyprOpenGL->destroyMonitorResources(m.get()); // mark resources as unusable anymore m->noFrameSchedule = true; - m->framesToSkip = 2; + m->framesToSkip = 1; } Debug::log(LOG, "Switched to VT %i, destroyed all render data, frames to skip for each: 2", TTY); @@ -812,8 +812,7 @@ void CKeybindManager::workspaceOpt(std::string args) { } void CKeybindManager::exitHyprland(std::string argz) { - g_pCompositor->cleanupExit(); - exit(0); + g_pCompositor->cleanup(); } void CKeybindManager::moveCurrentWorkspaceToMonitor(std::string args) { -- cgit v1.2.3