summaryrefslogtreecommitdiffstats
path: root/slock.c
diff options
context:
space:
mode:
authorDouglas Rumbaugh <dbr4@psu.edu>2022-01-31 17:19:50 -0500
committerDouglas Rumbaugh <dbr4@psu.edu>2022-01-31 17:19:50 -0500
commit0e428683cca2bbd788ac916ba5fe4738344666fb (patch)
tree09018ba0feb015ae851a85b5485244a990892c70 /slock.c
parentab298b7dfdec1c1eb15b0a5eb781ae503be417a1 (diff)
downloadslock-0e428683cca2bbd788ac916ba5fe4738344666fb.tar.gz
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.
Diffstat (limited to 'slock.c')
-rw-r--r--slock.c8
1 files changed, 1 insertions, 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);