summaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
authorDouglas Rumbaugh <doug@douglasrumbaugh.com>2022-01-12 14:56:48 -0500
committerDouglas Rumbaugh <doug@douglasrumbaugh.com>2022-01-12 14:56:48 -0500
commitaff663b62e7d603c0796485fcd42002a37c64c82 (patch)
treedddddac61e6deb5b62035b06df1278bba7f9041c /dwm.c
parent60da42738a44896956b4cb31a00e686e40e11fc3 (diff)
downloaddwm-aff663b62e7d603c0796485fcd42002a37c64c82.tar.gz
Enabled switching to tags by clicking
This is a little fragile, but it seems like it works at least for my configuration. If you do a SUPER+SHIFT+CLICK1 on a window, it will activate all the tags associated with that window. The main idea here is to allow going to the tags of a window from view all tags with a mouse click.
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dwm.c b/dwm.c
index e592be9..080e24d 100644
--- a/dwm.c
+++ b/dwm.c
@@ -575,6 +575,7 @@ buttonpress(XEvent *e)
} else
click = ClkWinTitle;
} else if ((c = wintoclient(ev->window))) {
+ arg.ui = c->tags;
focus(c);
restack(selmon);
XAllowEvents(dpy, ReplayPointer, CurrentTime);
@@ -583,7 +584,7 @@ buttonpress(XEvent *e)
for (i = 0; i < LENGTH(buttons); i++)
if (click == buttons[i].click && buttons[i].func && buttons[i].button == ev->button
&& CLEANMASK(buttons[i].mask) == CLEANMASK(ev->state))
- buttons[i].func(click == ClkTagBar && buttons[i].arg.i == 0 ? &arg : &buttons[i].arg);
+ buttons[i].func((click == ClkTagBar || click == ClkClientWin) && buttons[i].arg.i == 0 ? &arg : &buttons[i].arg);
}
void