[hackers] [dwm][PATCH] Invert urgent border for window hint

From: Ivan Tham <pickfire_AT_riseup.net>
Date: Mon, 2 Sep 2019 19:55:46 +0800

Feature parity for tags with urgent client. Tags are inversed but not
window border.

Window border now uses SchemeNorm ColFg, same as tags but for window.

Prior art: https://dwm.suckless.org/patches/focusurgent/
---
 dwm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dwm.c b/dwm.c
index 4465af1..c07d7b2 100644
--- a/dwm.c
+++ b/dwm.c
_AT_@ -2022,8 +2022,8 @@ updatewmhints(Client *c)
 		if (c == selmon->sel && wmh->flags & XUrgencyHint) {
 			wmh->flags &= ~XUrgencyHint;
 			XSetWMHints(dpy, c->win, wmh);
-		} else
-			c->isurgent = (wmh->flags & XUrgencyHint) ? 1 : 0;
+		} else if ((c->isurgent = (wmh->flags & XUrgencyHint) ? 1 : 0))
+			XSetWindowBorder(dpy, c->win, scheme[SchemeNorm][ColFg].pixel);
 		if (wmh->flags & InputHint)
 			c->neverfocus = !wmh->input;
 		else
-- 
2.23.0
Received on Mon Sep 02 2019 - 13:55:46 CEST

This archive was generated by hypermail 2.3.0 : Mon Sep 02 2019 - 14:00:26 CEST