Merge pull request #8 from herrwusel/pam_consistant

Consistent unlock styles with pam and blur patches
This commit is contained in:
Stein Gunnar Bakkeby 2022-06-03 09:44:08 +02:00 committed by GitHub
commit 3131706fc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

11
slock.c
View File

@ -318,9 +318,20 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
retval = pam_start(pam_service, hash, &pamc, &pamh); retval = pam_start(pam_service, hash, &pamc, &pamh);
color = PAM; color = PAM;
for (screen = 0; screen < nscreens; screen++) { for (screen = 0; screen < nscreens; screen++) {
#if DWM_LOGO_PATCH
drawlogo(dpy, locks[screen], color);
#elif BLUR_PIXELATED_SCREEN_PATCH || BACKGROUND_IMAGE_PATCH
if (locks[screen]->bgmap)
XSetWindowBackgroundPixmap(dpy, locks[screen]->win, locks[screen]->bgmap);
else
XSetWindowBackground(dpy, locks[screen]->win, locks[screen]->colors[0]);
XClearWindow(dpy, locks[screen]->win);
#else
XSetWindowBackground(dpy, locks[screen]->win, locks[screen]->colors[color]); XSetWindowBackground(dpy, locks[screen]->win, locks[screen]->colors[color]);
XClearWindow(dpy, locks[screen]->win); XClearWindow(dpy, locks[screen]->win);
XRaiseWindow(dpy, locks[screen]->win); XRaiseWindow(dpy, locks[screen]->win);
#endif // BLUR_PIXELATED_SCREEN_PATCH
} }
XSync(dpy, False); XSync(dpy, False);