swaylock
swaylock copied to clipboard
Show cleared state when backspacing last character
Typing A<backspace>
did not result in the cleared state even though the buffer was empty. One had to press backspace one more time to reach it.
I also tried always returning pw->len != 0
from backspace()
after the buffer has been modified, which fixes this as well.
But I decided against that, because then the meaning of the return value is unintuitive.
While I think this is a good idea, I should warn that i3lock has the same behavior as current swaylock in which the "cleared"/"no input" message only shows up when pressing backspace on an already empty password buffer.