Re: [dwm] questions about DWM source

From: yy <yiyu.jgl_AT_gmail.com>
Date: Sun, 9 Nov 2008 23:48:01 +0100

2008/11/10 robert hickman <robert.e.hickman_AT_googlemail.com>:
> Then I came across this pese of code in the manage function:
>
> Window trans = None;
>
> if(XGetTransientForHint(dpy, wind, &trans))
> t = getclient(trans);
> if(t)
> clien->tags = t->tags;
> else
> applyrules(clien);
>
> what exactly does this do? and why is it doing it?
>
> Thanks.
>
>

The XGetTransientForHint function will tell us if the window to be
managed (wind) is a child window, in such a case the parent client is
stored in t. When the window has a parent, parent's tags will be
applied to the child (clien->tags = t->tags), else rules are applied
(as defined in config.h).
And btw, wx, wy, etc. comes from wax, way, etc for "window area". It
is perfectly documented in dwm.c. Using sort names for geometric
variables is a common rule in many coding style guides.

hth,

-- 
- yiyus || JGL .
Received on Sun Nov 09 2008 - 22:48:01 UTC

This archive was generated by hypermail 2.2.0 : Sun Nov 09 2008 - 23:00:06 UTC