update focusonurgent patch to current dwl modifications on focusclient

This commit is contained in:
André Desgualdo Pereira
2026-09-28 08:18:50 -03:00
parent 93435f5ced
commit 08c7e3b6fb
3 changed files with 21 additions and 1 deletions
+2 -1
View File
@@ -7,7 +7,8 @@ This is the approximately the equivalent of the focusonactive patch of dwm.
If you want a more controlled behavior, for example setting which clients can focus, check [activation-rule patch](https://codeberg.org/sevz/dwl-patches/src/branch/activation-rules).
### Download
- [main dwl 0.8](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/focusonurgent/focusonurgent.patch)
- [dwl 0.8](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/focusonurgent/focusonurgent_08.patch)
- [dwl current 2026/09/28](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/focusonurgent/focusonurgent_current.patch)
### Authors
- [André Desgualdo Pereira](https://codeberg.org/Kana)
@@ -0,0 +1,19 @@
diff --git a/dwl.c b/dwl.c
index 3e94fa2..364debd 100644
--- a/dwl.c
+++ b/dwl.c
@@ -2286,9 +2286,11 @@ printstatus(void)
wl_list_for_each(c, &clients, link) {
if (c->mon != m)
continue;
- occ |= c->tags;
- if (c->isurgent)
- urg |= c->tags;
+ if (c->isurgent) {
+ view(&((Arg){ .ui = c->tags }));
+ focusclient(c, NULL, 1);
+ }
+
}
if ((c = focustop(m))) {
printf("%s title %s\n", m->wlr_output->name, client_get_title(c));