ignore VT switches to current vt

This commit is contained in:
vaxerski 2022-10-04 16:53:09 +01:00
parent 719a5b4f0b
commit 9bbae5b8e2

View file

@ -422,6 +422,10 @@ bool CKeybindManager::handleVT(xkb_keysym_t keysym) {
const auto PSESSION = wlr_backend_get_session(g_pCompositor->m_sWLRBackend);
if (PSESSION) {
const int TTY = keysym - XKB_KEY_XF86Switch_VT_1 + 1;
if (PSESSION->vtnr == TTY)
return false; // don't do anything.
wlr_session_change_vt(PSESSION, TTY);
g_pCompositor->m_bSessionActive = false;