diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2022-07-13 18:18:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-13 18:18:23 +0200 |
| commit | 6708f3b1334e8b6a966f424fe04713a4e74d5fdb (patch) | |
| tree | 3635c6d81e43ce033991fdd4b0f06083f07e86e4 /src/managers/KeybindManager.cpp | |
| parent | ef7ee2fd0f64a1a0a0088b90d3cbaeb6b3436c32 (diff) | |
Fixed TTY switching (#364)
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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) { |
