mirror of
https://github.com/bakkeby/dwm-flexipatch
synced 2024-11-05 00:00:18 +00:00
20 lines
462 B
C
20 lines
462 B
C
|
/* Selects for the view of the focused window. The list of tags */
|
||
|
/* to be displayed is matched to the focused window tag list. */
|
||
|
void
|
||
|
winview(const Arg* arg)
|
||
|
{
|
||
|
Window win, win_r, win_p, *win_c;
|
||
|
unsigned nc;
|
||
|
int unused;
|
||
|
Client* c;
|
||
|
Arg a;
|
||
|
|
||
|
if (!XGetInputFocus(dpy, &win, &unused)) return;
|
||
|
while (XQueryTree(dpy, win, &win_r, &win_p, &win_c, &nc)
|
||
|
&& win_p != win_r) win = win_p;
|
||
|
|
||
|
if (!(c = wintoclient(win))) return;
|
||
|
|
||
|
a.ui = c->tags;
|
||
|
view(&a);
|
||
|
}
|