From 8b413719940a2bc0e5ba3b1cd60024938ccdca76 Mon Sep 17 00:00:00 2001 From: girst Date: Wed, 21 Mar 2018 18:22:52 +0100 Subject: [PATCH] flash all monitors --- Makefile | 2 +- xvisbell.c | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index de25240..dd82abe 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ 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..55c9620 100644 --- a/xvisbell.c +++ b/xvisbell.c @@ -1,12 +1,14 @@ /* briefly flashes a fullscreen white window to simulate a visual bell */ #define _DEFAULT_SOURCE #include +#include #include 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 +34,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