X-Git-Url: https://git.xinqibao.xyz/slock.git/blobdiff_plain/0f1157d7e6cabe0394ffc35a0a58a30507af8ebd..9fa696d6c13e64b5bdc9dd01e4965eccec4b23cf:/slock.c?ds=sidebyside diff --git a/slock.c b/slock.c index 866400d..0f4c3cc 100644 --- a/slock.c +++ b/slock.c @@ -1,7 +1,7 @@ /* (C)opyright MMIV-MMV Anselm R. Garbe * See LICENSE file for license details. */ -#define _XOPEN_SOURCE +#define _XOPEN_SOURCE 500 #if HAVE_SHADOW_H #include @@ -9,6 +9,7 @@ #include #endif +#include #include #include #include @@ -22,13 +23,13 @@ int main(int argc, char **argv) { char curs[] = {0, 0, 0, 0, 0, 0, 0, 0}; char buf[32], passwd[256]; - int num, prev_nitem, screen; + int num, screen; #if HAVE_SHADOW_H struct spwd *sp; #else struct passwd *pw; #endif - unsigned int i, len; + unsigned int len; Bool running = True; Cursor invisible; Display *dpy; @@ -90,17 +91,6 @@ main(int argc, char **argv) { || IsMiscFunctionKey(ksym) || IsPFKey(ksym) || IsPrivateKeypadKey(ksym)) continue; - /* first check if a control mask is omitted */ - if(ev.xkey.state & ControlMask) { - switch (ksym) { - case XK_h: - case XK_H: ksym = XK_BackSpace; - break; - case XK_u: - case XK_U: passwd[0] = 0; - continue; - } - } switch(ksym) { case XK_Return: #if HAVE_SHADOW_H