From af9e8d175892faf53231da9b10121df199e06c31 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 21 Feb 2024 23:05:36 +0000 Subject: [PATCH] core: do not process keys on pending password verif fixes #54 --- src/core/hyprlock.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/hyprlock.cpp b/src/core/hyprlock.cpp index 35f8617..27223c4 100644 --- a/src/core/hyprlock.cpp +++ b/src/core/hyprlock.cpp @@ -644,6 +644,13 @@ std::optional CHyprlock::passwordLastFailReason() { void CHyprlock::onKey(uint32_t key) { const auto SYM = xkb_state_key_get_one_sym(m_pXKBState, key + 8); + if (m_sPasswordState.result) { + for (auto& o : m_vOutputs) { + o->sessionLockSurface->render(); + } + return; + } + if (SYM == XKB_KEY_BackSpace) { if (m_sPasswordState.passBuffer.length() > 0) m_sPasswordState.passBuffer = m_sPasswordState.passBuffer.substr(0, m_sPasswordState.passBuffer.length() - 1);