From be6737e68f0d7188cca09c559c51ddb62e16c688 Mon Sep 17 00:00:00 2001 From: Miles Alan Date: Sun, 5 Jul 2020 22:13:36 -0500 Subject: [PATCH] Always wake up from suspend to StateNoInput --- programs/sxmo_screenlock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/programs/sxmo_screenlock.c b/programs/sxmo_screenlock.c index d5dc9fe..9d24f03 100644 --- a/programs/sxmo_screenlock.c +++ b/programs/sxmo_screenlock.c @@ -65,6 +65,8 @@ syncstate() if (state == StateSuspend) { setpineled(Red); writefile(powerstatefile, "mem"); + state = StateNoInput; + syncstate(); } else if (state == StateNoInput) { setpineled(Blue); writefile(brightnessfile, "200"); @@ -137,7 +139,7 @@ readinputloop(Display *dpy, int screen) { lastkeysym = NULL; switch (keysym) { case XF86XK_AudioRaiseVolume: - state = (state == StateSuspend ? StateDead : StateSuspend); + state = StateSuspend; break; case XF86XK_AudioLowerVolume: state = (state == StateNoInput ? StateNoInputNoScreen : StateNoInput);