]> Dogcows Code - chaz/tint2/commitdiff
*fix* respect the urgency flag if set by a window
authorAndreas Fink <andreas.fink85@googlemail.com>
Tue, 15 Sep 2009 20:11:13 +0000 (20:11 +0000)
committerAndreas Fink <andreas.fink85@googlemail.com>
Tue, 15 Sep 2009 20:11:13 +0000 (20:11 +0000)
src/server.c
src/server.h
src/tint.c

index 4f655617df1e51e6259695c2f9fbe33a528c78e9..bca5fb6ae330386f7de27eee9962866aee19ed11 100644 (file)
@@ -73,6 +73,7 @@ void server_init_atoms ()
        server.atom.WM_NAME = XInternAtom(server.dsp, "WM_NAME", False);
        server.atom.__SWM_VROOT = XInternAtom(server.dsp, "__SWM_VROOT", False);
        server.atom._MOTIF_WM_HINTS = XInternAtom(server.dsp, "_MOTIF_WM_HINTS", False);
+       server.atom.WM_HINTS = XInternAtom(server.dsp, "WM_HINTS", False);
 
        // systray protocol
        name_trayer = g_strdup_printf("_NET_SYSTEM_TRAY_S%d", DefaultScreen(server.dsp));
index 5ece8a46e7bef235f7337134dd5e746161cb0826..401f22215157cf76d042ccda65c7d9fec44cee08 100644 (file)
@@ -55,6 +55,7 @@ typedef struct Global_atom
        Atom WM_NAME;
        Atom __SWM_VROOT;
        Atom _MOTIF_WM_HINTS;
+       Atom WM_HINTS;
        Atom _NET_SYSTEM_TRAY_SCREEN;
        Atom _NET_SYSTEM_TRAY_OPCODE;
        Atom MANAGER;
index c23f115aa6c6333ba63436d2da2e5848d49addaa..f5713dab662698b4c0c87357e4a0e9ff087e1a84 100644 (file)
@@ -581,6 +581,15 @@ void event_property_notify (XEvent *e)
                                panel_refresh = 1;
                        }
                }
+               else if (at == server.atom.WM_HINTS) {
+                       XWMHints* wmhints = XGetWMHints(server.dsp, win);
+                       if (wmhints->flags & XUrgencyHint) {
+                               task_urgent = tsk;
+                               tick_urgent = 0;
+                               time_precision = 1;
+                       }
+                       XFree(wmhints);
+               }
 
                if (!server.got_root_win) server.root_win = RootWindow (server.dsp, server.screen);
        }
This page took 0.025993 seconds and 4 git commands to generate.