Skip to content

Commit

Permalink
core: do not process keys on pending password verif
Browse files Browse the repository at this point in the history
fixes #54
  • Loading branch information
vaxerski committed Feb 21, 2024
1 parent 29c5d4d commit af9e8d1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/hyprlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,13 @@ std::optional<std::string> 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);
Expand Down

0 comments on commit af9e8d1

Please sign in to comment.