dwm

Kris's build of dwm
git clone git clone https://git.krisyotam.com/krisyotam/dwm.git
Log | Files | Refs | README | LICENSE

winview.c (464B)


      1 /* Selects for the view of the focused window. The list of tags */
      2 /* to be displayed is matched to the focused window tag list. */
      3 void
      4 winview(const Arg* arg)
      5 {
      6 	Window win, win_r, win_p, *win_c;
      7 	unsigned nc;
      8 	int unused;
      9 	Client* c;
     10 	Arg a;
     11 
     12 	if (!XGetInputFocus(dpy, &win, &unused)) return;
     13 	while (XQueryTree(dpy, win, &win_r, &win_p, &win_c, &nc)
     14 	      && win_p != win_r) win = win_p;
     15 
     16 	if (!(c = wintoclient(win))) return;
     17 
     18 	a.ui = c->tags;
     19 	view(&a);
     20 }
     21