mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-06 07:01:57 -07:00
ignore VT switches to current vt
This commit is contained in:
@@ -422,6 +422,10 @@ bool CKeybindManager::handleVT(xkb_keysym_t keysym) {
|
|||||||
const auto PSESSION = wlr_backend_get_session(g_pCompositor->m_sWLRBackend);
|
const auto PSESSION = wlr_backend_get_session(g_pCompositor->m_sWLRBackend);
|
||||||
if (PSESSION) {
|
if (PSESSION) {
|
||||||
const int TTY = keysym - XKB_KEY_XF86Switch_VT_1 + 1;
|
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);
|
wlr_session_change_vt(PSESSION, TTY);
|
||||||
g_pCompositor->m_bSessionActive = false;
|
g_pCompositor->m_bSessionActive = false;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user