summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-10-06 19:31:32 +0100
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-10-06 19:31:32 +0100
commitf901c60da534035f86ce47920416cedc56240ca4 (patch)
tree87a6784e5e84b46e981ecda3b772be641291db77 /src/managers/KeybindManager.cpp
parent922e978f56ed8a00700ed7730ea56bd1e10665b3 (diff)
return true on vt switch keysyms to avoid printing stuff
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index 3e00ea09..7e539149 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -423,6 +423,9 @@ bool CKeybindManager::handleVT(xkb_keysym_t keysym) {
if (!(keysym >= XKB_KEY_XF86Switch_VT_1 && keysym <= XKB_KEY_XF86Switch_VT_12))
return false;
+ // beyond this point, return true to not handle anything else.
+ // we'll avoid printing shit to active windows.
+
if (g_pCompositor->m_sWLRSession) {
const unsigned int TTY = keysym - XKB_KEY_XF86Switch_VT_1 + 1;
@@ -436,12 +439,12 @@ bool CKeybindManager::handleVT(xkb_keysym_t keysym) {
}
if (ttynum == TTY)
- return false;
+ return true;
Debug::log(LOG, "Switching from VT %i to VT %i", ttynum, TTY);
if (!wlr_session_change_vt(g_pCompositor->m_sWLRSession, TTY))
- return false; // probably same session
+ return true; // probably same session
g_pCompositor->m_bSessionActive = false;
@@ -455,7 +458,7 @@ bool CKeybindManager::handleVT(xkb_keysym_t keysym) {
return true;
}
- return false;
+ return true;
}
bool CKeybindManager::handleInternalKeybinds(xkb_keysym_t keysym) {