* See LICENSE file for license details.
*/
#define _XOPEN_SOURCE 500
+#if HAVE_SHADOW_H
+#include <shadow.h>
+#endif
#include <ctype.h>
#include <pwd.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#if HAVE_SHADOW_H
-#include <shadow.h>
-#endif
#include <sys/types.h>
#include <X11/keysym.h>
#include <X11/Xlib.h>
screen = DefaultScreen(dpy);
/* init */
- len = 0;
-
wa.override_redirect = 1;
wa.background_pixel = BlackPixel(dpy, screen);
w = XCreateWindow(dpy, RootWindow(dpy, screen), 0, 0,
GrabModeAsync, CurrentTime) != GrabSuccess); len--)
usleep(1000);
running = running && (len > 0);
+ len = 0;
XMapRaised(dpy, w);
XSync(dpy, False);
break;
case XK_BackSpace:
if(len)
- --len;
+ --len;
break;
default:
if(num && !iscntrl((int) buf[0])) {
- memcpy(passwd + len,buf,num);
+ memcpy(passwd + len, buf, num);
len += num;
}
break;