From 7fe290377d904721cf25a806f7bbbd7f561eca9a Mon Sep 17 00:00:00 2001 From: ayin Date: Wed, 2 May 2007 23:06:32 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 2 ++ README.configure | 1 + doc/rxvt.1.pod | 5 +++++ src/command.C | 13 +++++++++++++ src/optinc.h | 2 ++ src/rsinc.h | 1 + src/screen.C | 13 +++++++++++++ src/xdefaults.C | 3 +++ 8 files changed, 40 insertions(+) diff --git a/Changes b/Changes index 1602b24e..43b48e13 100644 --- a/Changes +++ b/Changes @@ -25,6 +25,8 @@ TODO: add bell event (or generic event to act on such controls). - do not process focus events caused by grabs (patch by Mikachu). - better option handling, support more than 30 options (exg). + - add urgentOnBell resource to set the urgency hint + (patch by Philip Paeps). 8.2 Sat Feb 17 21:35:28 CET 2007 - fix make depend in src/, reported by exg. diff --git a/README.configure b/README.configure index 5ef39359..7b14a77e 100644 --- a/README.configure +++ b/README.configure @@ -164,6 +164,7 @@ CONFIGURE OPTIONS MWM-hints EWMH-hints (pid, utf8 names) and protocols (ping) + urgency hint seperate underline colour (-underlineColor) settable border widths and borderless switch (-w, -b, -bl) visual depth selection (-depth) diff --git a/doc/rxvt.1.pod b/doc/rxvt.1.pod index 4636a5f3..279c446e 100644 --- a/doc/rxvt.1.pod +++ b/doc/rxvt.1.pod @@ -753,6 +753,11 @@ set; option B<-n>. B: de-iconify (map) on receipt of a bell character. B: no de-iconify (map) on receipt of a bell character [default]. +=item B I + +B: set the urgency hint for the wm on receipt of a bell character. +B: do not set the urgency hint [default]. + =item B I B: use visual bell on receipt of a bell character; option B<-vb>. diff --git a/src/command.C b/src/command.C index a874a02c..aacfd946 100644 --- a/src/command.C +++ b/src/command.C @@ -1741,6 +1741,19 @@ rxvt_term::focus_in () pix_colors = pix_colors_focused; scr_recolour (); } +#endif +#if ENABLE_FRILLS + if (option (Opt_urgentOnBell)) + { + XWMHints *h; + + h = XGetWMHints(dpy, parent[0]); + if (h != NULL) + { + h->flags &= ~XUrgencyHint; + XSetWMHints(dpy, parent[0], h); + } + } #endif } } diff --git a/src/optinc.h b/src/optinc.h index 99dbac25..771d413e 100644 --- a/src/optinc.h +++ b/src/optinc.h @@ -34,12 +34,14 @@ def(hold, 26) // hold window open after exit def(override_redirect, 27) def(skipBuiltinGlyphs, 28) // do not use internal glyphs + def(urgentOnBell, 30) #else nodef(insecure) nodef(borderLess) nodef(hold) nodef(override_redirect) nodef(skipBuiltinGlyphs) + nodef(urgentOnBell) #endif #if ENABLE_STYLES def(intensityStyles, 29) // font styles imply intensity diff --git a/src/rsinc.h b/src/rsinc.h index e1125d0e..089a9a07 100644 --- a/src/rsinc.h +++ b/src/rsinc.h @@ -77,6 +77,7 @@ def (lineSpace) def (cursorUnderline) def (skipBuiltinGlyphs) + def (urgentOnBell) #endif #if CURSOR_BLINK def (cursorBlink) diff --git a/src/screen.C b/src/screen.C index f392c451..6d2550c2 100644 --- a/src/screen.C +++ b/src/screen.C @@ -1892,6 +1892,19 @@ rxvt_term::scr_bell () NOTHROW # endif XMapWindow (dpy, parent[0]); # endif +# if ENABLE_FRILLS + if (option (Opt_urgentOnBell)) + { + XWMHints *h; + + h = XGetWMHints(dpy, parent[0]); + if (h != NULL) + { + h->flags |= XUrgencyHint; + XSetWMHints(dpy, parent[0], h); + } + } +# endif if (option (Opt_visualBell)) { diff --git a/src/xdefaults.C b/src/xdefaults.C index 017f66cc..56a6d830 100644 --- a/src/xdefaults.C +++ b/src/xdefaults.C @@ -123,6 +123,9 @@ optList[] = { #endif BOOL (Rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, 0, "utmp inhibit"), #ifndef NO_BELL +# if ENABLE_FRILLS + BOOL (Rs_urgentOnBell, "urgentOnBell", NULL, Opt_urgentOnBell, 0, "set the urgency hint for the wm on bell"), +# endif BOOL (Rs_visualBell, "visualBell", "vb", Opt_visualBell, 0, "visual bell"), # if ! defined(NO_MAPALERT) && defined(MAPALERT_OPTION) BOOL (Rs_mapAlert, "mapAlert", NULL, Opt_mapAlert, 0, NULL), -- 2.34.1