parent
69b8f7a252
commit
5e7a95b50f
|
|
@ -8,6 +8,9 @@ static const char *colorname[NUMCOLS] = {
|
||||||
[FAILED] = "#CC3333", /* wrong password */
|
[FAILED] = "#CC3333", /* wrong password */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* lock screen opacity */
|
||||||
|
static const float alpha = 1;
|
||||||
|
|
||||||
/* treat a cleared input like a wrong password (color) */
|
/* treat a cleared input like a wrong password (color) */
|
||||||
static const int failonclear = 1;
|
static const int failonclear = 1;
|
||||||
|
|
||||||
|
|
|
||||||
3
config.h
3
config.h
|
|
@ -8,6 +8,9 @@ static const char *colorname[NUMCOLS] = {
|
||||||
[FAILED] = "#FF5555", /* wrong password */
|
[FAILED] = "#FF5555", /* wrong password */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* lock screen opacity */
|
||||||
|
static const float alpha = 1;
|
||||||
|
|
||||||
/* treat a cleared input like a wrong password (color) */
|
/* treat a cleared input like a wrong password (color) */
|
||||||
static const int failonclear = 1;
|
static const int failonclear = 1;
|
||||||
|
|
||||||
|
|
|
||||||
4
slock.c
4
slock.c
|
|
@ -18,6 +18,7 @@
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
#include <X11/Xatom.h>
|
||||||
|
|
||||||
#include "arg.h"
|
#include "arg.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
@ -334,6 +335,9 @@ lockscreen(Display *dpy, struct xrandr *rr, int screen)
|
||||||
XRRSelectInput(dpy, lock->win, RRScreenChangeNotifyMask);
|
XRRSelectInput(dpy, lock->win, RRScreenChangeNotifyMask);
|
||||||
|
|
||||||
XSelectInput(dpy, lock->root, SubstructureNotifyMask);
|
XSelectInput(dpy, lock->root, SubstructureNotifyMask);
|
||||||
|
unsigned int opacity = (unsigned int)(alpha * 0xffffffff);
|
||||||
|
XChangeProperty(dpy, lock->win, XInternAtom(dpy, "_NET_WM_WINDOW_OPACITY", False), XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&opacity, 1L);
|
||||||
|
XSync(dpy, False);
|
||||||
return lock;
|
return lock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue