From 0e428683cca2bbd788ac916ba5fe4738344666fb Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Mon, 31 Jan 2022 17:19:50 -0500 Subject: PAM Auth Update: Modified the changes made by the PAM Auth patch to integrate them with my custom bg/fg. Now instead of the whole screen going purple, only the logo will--like with all of the other color options. --- slock.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/slock.c b/slock.c index 3fb13ac..a165a5e 100644 --- a/slock.c +++ b/slock.c @@ -206,9 +206,6 @@ resizerectangles(struct lock *lock) static void drawlogo(Display *dpy, struct lock *lock, int color) { - /* - XSetForeground(dpy, lock->gc, lock->colors[BACKGROUND]); - XFillRectangle(dpy, lock->drawable, lock->gc, 0, 0, lock->x, lock->y); */ lock->drawable = lock->bgmap; XSetForeground(dpy, lock->gc, lock->colors[color]); XFillRectangles(dpy, lock->drawable, lock->gc, lock->rectangles, LENGTH(rectangles)); @@ -260,11 +257,8 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens, retval = pam_start(pam_service, hash, &pamc, &pamh); color = PAM; for (screen = 0; screen < nscreens; screen++) { - XSetWindowBackground(dpy, locks[screen]->win, locks[screen]->colors[color]); - XClearWindow(dpy, locks[screen]->win); - XRaiseWindow(dpy, locks[screen]->win); + drawlogo(dpy, locks[screen], color); } - XSync(dpy, False); if (retval == PAM_SUCCESS) retval = pam_authenticate(pamh, 0); -- cgit v1.2.3