[hackers] [tabbed] focus(): clear XUrgencyHint from the container window || Mikhail Pchelin

From: <git_AT_suckless.org>
Date: Thu, 23 Jan 2025 14:23:14 +0100 (CET)

commit 82374bcf6d35f6b05412382b8e51e1202ce4379b
Author: Mikhail Pchelin <misha_AT_freebsd.org>
AuthorDate: Tue Jan 21 20:28:42 2025 +0300
Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
CommitDate: Thu Jan 23 14:22:51 2025 +0100

    focus(): clear XUrgencyHint from the container window

diff --git a/tabbed.c b/tabbed.c
index e5664aa..aa45716 100644
--- a/tabbed.c
+++ b/tabbed.c
_AT_@ -447,6 +447,7 @@ focus(int c)
         char buf[BUFSIZ] = "tabbed-"VERSION" ::";
         size_t i, n;
         XWMHints* wmh;
+ XWMHints* win_wmh;
 
         /* If c, sel and clients are -1, raise tabbed-win itself */
         if (nclients == 0) {
_AT_@ -480,6 +481,17 @@ focus(int c)
                 XSetWMHints(dpy, clients[c]->win, wmh);
                 clients[c]->urgent = False;
                 XFree(wmh);
+
+ /*
+ * gnome-shell will not stop notifying us about urgency,
+ * if we clear only the client hint and don't clear the
+ * hint from the main container window
+ */
+ if ((win_wmh = XGetWMHints(dpy, win))) {
+ win_wmh->flags &= ~XUrgencyHint;
+ XSetWMHints(dpy, win, win_wmh);
+ XFree(win_wmh);
+ }
         }
 
         drawbar();
Received on Thu Jan 23 2025 - 14:23:14 CET

This archive was generated by hypermail 2.3.0 : Thu Jan 23 2025 - 14:24:38 CET