From 41714c8c967760348a7ed6cc928ecfbdfc36b2e8 Mon Sep 17 00:00:00 2001 From: Miles Alan Date: Fri, 5 Jun 2020 21:58:09 -0500 Subject: [PATCH] Attempt to fix screenlock - only show led after screen is already locked --- programs/sxmo_screenlock.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/programs/sxmo_screenlock.c b/programs/sxmo_screenlock.c index 0e3bb29..f1b0b00 100644 --- a/programs/sxmo_screenlock.c +++ b/programs/sxmo_screenlock.c @@ -150,8 +150,6 @@ main(int argc, char **argv) { Display *dpy; Screen *screen; - - if (setuid(0)) die("setuid(0) failed\n"); if (!(dpy = XOpenDisplay(NULL))) @@ -160,9 +158,8 @@ main(int argc, char **argv) { screen = XDefaultScreen(dpy); XSync(dpy, 0); getoldbrightness(); - updatescreenon(1); lockscreen(dpy, screen); - XSync(dpy, 0); + updatescreenon(1); readinputloop(dpy, screen); return 0; }