add xnolock program

This commit is contained in:
Neale Pickett 2012-03-02 16:47:46 -07:00
parent ebea23e5c0
commit cfe9ab22e3
3 changed files with 17 additions and 3 deletions

View File

@ -3,7 +3,7 @@ BINDIR ?= $(HOME)/bin/$(HOSTTYPE)
CFLAGS = -Wall
LDLIBS = -L/usr/X11R6/lib -lX11
BINARIES = xss xsswin xcursorpos xkeygrab xbell magic
BINARIES = xss xsswin xcursorpos xkeygrab xbell magic xnolock
all: $(BINARIES)
@ -13,6 +13,6 @@ install: $(BINARIES)
clean:
rm -f $(BINARIES)
xss: LDLIBS += -lXss
xss xnolock: LDLIBS += -lXss
.PHONY: all install clean

15
xnolock.c Normal file
View File

@ -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;
}

View File

@ -50,7 +50,6 @@ main(int argc, char * const argv[])
wa.override_redirect = 1;
wa.background_pixel = BlackPixel(display, screen);
{
Pixmap pmap;
XColor black;
pmap = XCreateBitmapFromData(display, root, "\0", 1, 1);