mirror of https://github.com/9wm/xss.git
add xnolock program
This commit is contained in:
parent
ebea23e5c0
commit
cfe9ab22e3
4
Makefile
4
Makefile
|
@ -3,7 +3,7 @@ BINDIR ?= $(HOME)/bin/$(HOSTTYPE)
|
||||||
CFLAGS = -Wall
|
CFLAGS = -Wall
|
||||||
LDLIBS = -L/usr/X11R6/lib -lX11
|
LDLIBS = -L/usr/X11R6/lib -lX11
|
||||||
|
|
||||||
BINARIES = xss xsswin xcursorpos xkeygrab xbell magic
|
BINARIES = xss xsswin xcursorpos xkeygrab xbell magic xnolock
|
||||||
|
|
||||||
all: $(BINARIES)
|
all: $(BINARIES)
|
||||||
|
|
||||||
|
@ -13,6 +13,6 @@ install: $(BINARIES)
|
||||||
clean:
|
clean:
|
||||||
rm -f $(BINARIES)
|
rm -f $(BINARIES)
|
||||||
|
|
||||||
xss: LDLIBS += -lXss
|
xss xnolock: LDLIBS += -lXss
|
||||||
|
|
||||||
.PHONY: all install clean
|
.PHONY: all install clean
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/extensions/scrnsaver.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
Display *display = XOpenDisplay(NULL);
|
||||||
|
|
||||||
|
XScreenSaverSuspend(display, True);
|
||||||
|
XFlush(display);
|
||||||
|
pause();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
1
xsswin.c
1
xsswin.c
|
@ -50,7 +50,6 @@ main(int argc, char * const argv[])
|
||||||
wa.override_redirect = 1;
|
wa.override_redirect = 1;
|
||||||
wa.background_pixel = BlackPixel(display, screen);
|
wa.background_pixel = BlackPixel(display, screen);
|
||||||
{
|
{
|
||||||
Pixmap pmap;
|
|
||||||
XColor black;
|
XColor black;
|
||||||
|
|
||||||
pmap = XCreateBitmapFromData(display, root, "\0", 1, 1);
|
pmap = XCreateBitmapFromData(display, root, "\0", 1, 1);
|
||||||
|
|
Loading…
Reference in New Issue