mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-12-22 13:29:48 +01:00
input: Clear password buffer with escape key (#37)
This commit is contained in:
parent
7b15d34f0a
commit
277a377eb2
1 changed files with 4 additions and 0 deletions
|
@ -454,6 +454,10 @@ void CHyprlock::onKey(uint32_t key) {
|
||||||
Debug::log(LOG, "Authenticating");
|
Debug::log(LOG, "Authenticating");
|
||||||
|
|
||||||
m_sPasswordState.result = g_pPassword->verify(m_sPasswordState.passBuffer);
|
m_sPasswordState.result = g_pPassword->verify(m_sPasswordState.passBuffer);
|
||||||
|
} else if (SYM == XKB_KEY_Escape) {
|
||||||
|
Debug::log(LOG, "Clearing password buffer");
|
||||||
|
|
||||||
|
m_sPasswordState.passBuffer = "";
|
||||||
} else {
|
} else {
|
||||||
char buf[16] = {0};
|
char buf[16] = {0};
|
||||||
int len = xkb_keysym_to_utf8(SYM, buf, 16);
|
int len = xkb_keysym_to_utf8(SYM, buf, 16);
|
||||||
|
|
Loading…
Reference in a new issue