Wake up on mouse button press and a minor state text issue.

This commit is contained in:
ikolokolnikov committed 2026-09-24 23:03:55 -07:00
1 parent 8650a737e1
commit 6847713826
1 file changed
+5 -3
+5 -3
View File
@@ -131,6 +131,7 @@ unsigned long long millis()
return (unsigned long long)ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
}
/* TODO: Move into global state. Should be in the arena. */
XRRScreenResources *crtcres = 0;
static int crtccount = 0;
static XRRCrtcInfo *crtcinfos[16];
@@ -532,7 +533,7 @@ render_screen(struct arena *arena,
message_str_len = 32;
message_str = (char *)arena_alloc(&temp_arena, message_str_len);
if(failure)
if(locked && failure)
memcpy(message_str, "wrong password", 15);
else if(locked)
memcpy(message_str, "locked", 7);
@@ -681,13 +682,14 @@ readpw(struct arena *arena,
if(ev.type == MotionNotify) {
needs_rendering = 1;
dson = 1;
set_screen_on(dpy);
} else if(ev.type == ButtonPress) {
needs_rendering = 1;
dson = 1;
} else if (ev.type == KeyPress) {
explicit_bzero(&buf, sizeof(buf));
num = XLookupString(&ev.xkey, buf, sizeof(buf), &ksym, 0);
needs_rendering = 1;
if(ksym != XK_Escape) {
dson = 1;
}