~kris/suckless

slock

ref: e5a9d8539b2ec56aacb1db455a4235e4d1ff41ca slock/slock.c -rw-r--r-- 17.6 KiB
e5a9d853 — bakkeby 5 years ago
Adding auto-timeout patch
35fd53f6 — bakkeby 5 years ago
Adding secret password patch
7dc45011 — bakkeby 5 years ago
Adding failure-command patch
d2be9eb6 — bakkeby 5 years ago
Adding color message patch ref. #3
0bba4617 — bakkeby 6 years ago
Adding alpha patch
74c66223 — bakkeby 6 years ago
Adding blur pixelated screen patch
c07648d3 — bakkeby 6 years ago
Adding keypress_feedback patch
2445d75b — bakkeby 6 years ago
Fix bug in DPMS patch + moved patches.h to patches.def.h to match that of config
4c905a9c — bakkeby 6 years ago
Adding xresources patch
2cf80900 — bakkeby 6 years ago
Added capscolor, control clear, dpms, mediakeys, message, pam auth, quickcancel patches
35633d45 — Tobias Stoeckmann 9 years ago
Properly clear the last entered character

When enter is pressed, passwd[len] will be set to '\0'. Pressing
backspace is supposed to remove the last entered character.

But currently, the clearing has an off-by-one, as in setting
passwd[len] to '\0' just like enter would do.

You can also verify it by imagining len=1 and that it's impossible to
clear passwd[0] by pressing backspace with the current code.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
325581b9 — Markus Teich 9 years ago
syntax fix
0ff0d9f7 — Markus Teich 9 years ago
there can only be one window in the event
7a604ec1 — Bob Uhl 9 years ago
Fix resize with multiple monitors and portrait mode

When connecting/disconnecting a portrait monitor, the
XRRScreenChangeNotifyEvent height & width are reversed due to the XRandR
rotation; detect this and DTRT.
7d31ff65 — Markus Teich 9 years ago
move config.h inclusion after type declarations
59746954 — Laslo Hunhold 9 years ago
Unboolify slock.c
c96e725d — FRIGN 9 years ago
Use explicit strcmp() instead of inlining it

Makes it a tad more readable; the previous "optimization" will be done
by the compiler anyway.
6a1bd896 — FRIGN 9 years ago
No need for oldc to be static
b099d2fd — FRIGN 9 years ago
Use NUL character constant explicitly
0a43b78d — FRIGN 9 years ago
Keep the line-lengths at bay

This makes the code more readable and prevents wraparounds in the
editor.
Next