#include #include #include #include #include #include // // gcc -g -Wall -o urgency_test urgency_test.c -lX11 // // test case for urgency hint // int main() { // Open the display Display *dpy = XOpenDisplay(NULL); assert(dpy); // Get some colors int blackColor = BlackPixel(dpy, DefaultScreen(dpy)); // Create the window Window w = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 0, 0, 200, 100, 0, blackColor, blackColor); // Map the window XMapWindow(dpy, w); XFlush(dpy); sleep(2); printf("Setting the urgency hint\n"); XWMHints *h; h = XAllocWMHints(); h->initial_state = NormalState; // = XGetWMHints(dpy, w); h->flags |= XUrgencyHint; // h->flags &= ~XUrgencyHint; XSetWMHints(dpy, w, h); XFlush(dpy); while (1) { sleep(1); } return 0; }