[hackers][tabbed][PATCH]Clear urgency hint on tabbed window when it gets focused

From: <mikau_AT_aaathats3as.com>
Date: Sun, 7 Jun 2020 01:55:52 +0200

From 21cbc4bd2069d8ace733361f50aca5bfab7504c3 Mon Sep 17 00:00:00 2001
From: Mikau <mikau_AT_aaathats3as.com>
Date: Sun, 7 Jun 2020 01:44:33 +0200
Subject: [PATCH] Clear urgency hint on the tabbed window itself, not only on
 the client

When an urgent client got focused, we cleared the urgency hint on it but
didn't clear the urgency hint on the tabbed window, which lead to the
tabbed window staying urgen (which was very annoying). This fixis that
 tabbed.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/tabbed.c b/tabbed.c
index d1f087b..49945dd 100644
--- a/tabbed.c
+++ b/tabbed.c
_AT_@ -481,6 +481,11 @@ focus(int c)
 		XSetWMHints(dpy, clients[c]->win, wmh);
 		clients[c]->urgent = False;
+		if (wmh = XGetWMHints(dpy, win)) {
+			wmh->flags &= ~XUrgencyHint;
+			XSetWMHints(dpy, win, wmh);
+			XFree(wmh);
+		}
This clears the urgency hint on tabbed when the urgency hint on the
offending tab gets cleared. Maybe a better approach would be to either
clear it when tabbed gets focused (Urgency is supposed to direct the
user's attention to the window, which has already happened if the
window is focused), or to only clear it once no tab is urgent (If
multiple tabs are urgent and the user focuses tabbed, selects one of
the urgent tabs. and then focuses another window, one of the tabs is
still urgent, which you could argue means that tabbed itself should be
urgent again).
Which of these should be prefered is ultimately up to the maintainers.
I just want to get rid of the flashing in my taskbar.
Received on Sun Jun 07 2020 - 01:55:52 CEST

This archive was generated by hypermail 2.3.0 : Sun Jun 07 2020 - 02:00:35 CEST