Consistent unlock styles with pam and blur patches

This commit is contained in:
herrwusel 2022-05-30 10:44:03 +00:00 committed by GitHub
parent 9036c899a9
commit 8f6f789708
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);