From 572ac399540da0662e87fd5797cd8fea3e0d687b Mon Sep 17 00:00:00 2001 From: girst Date: Wed, 21 Mar 2018 18:22:52 +0100 Subject: [PATCH] flash all monitors --- Makefile | 5 ++--- xvisbell.c | 10 ++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index de25240..3582a93 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,12 @@ .PHONY: all clean -CC = gcc -CFLAGS = -std=c89 -lXt -lX11 +CFLAGS = -std=c89 -lX11 PREFIX = $(DESTDIR)/usr/local TARGET = xvisbell all: $(TARGET) $(TARGET):%:%.c - $(CC) $(CFLAGS) $< -o $@ + $(CC) $< -o $@ $(CFLAGS) clean: rm -f $(TARGET) diff --git a/xvisbell.c b/xvisbell.c index d5f34b9..5593fa6 100644 --- a/xvisbell.c +++ b/xvisbell.c @@ -7,6 +7,7 @@ int main (int argc, char** argv) { Display *display; Window window; XWindowAttributes xwa; + XSetWindowAttributes xswa; unsigned long bgcolor = 0xffffff; /* parse command line arguments for 3bit colors */ @@ -32,13 +33,10 @@ int main (int argc, char** argv) { 0, 0, /* border settings */ bgcolor); - Atom wdialog = XInternAtom (display, "_NET_WM_WINDOW_TYPE_DIALOG", 1); - XChangeProperty (display, window, - XInternAtom (display, "_NET_WM_WINDOW_TYPE", 1), - XInternAtom (display, "ATOM", 1), - 32, PropModeReplace, (unsigned char *) &wdialog, 1); + /*shut out window manager (makes window full screen over all monitors)*/ + xswa.override_redirect = 1; + XChangeWindowAttributes (display, window, CWOverrideRedirect, &xswa); - XFlush(display); XMapWindow(display,window); XFlush(display); -- 2.39.3