Re: [dwm] dwm-3.1 / dmenu-2.0

From: Szabolcs Nagy <nszabolcs_AT_gmail.com>
Date: Tue, 16 Jan 2007 17:46:57 +0100

> with a border the focussed window. May be that the border could be activated
> only when there is more than one client in the view, since when there is
> only
> one it seems redundant, but I do not know how heavy would be the impact of
> this on the code.

i thought about that too, actually it's pretty easy:
you can do it in view.c:dotile() (in the loop you should check for "n
== 1" then set client size to the window area size (waw,wah))

a nicer solution is to do it in client.c:resize()
actually if a window is fullscreen sized, the border is not drawn:

if(c->w == sw && c->h == sh)
        wc.border_width = 0;
else
        wc.border_width = BORDERPX;
XConfigureWindow(dpy, c->win, CWX | CWY | CWWidth | CWHeight |
CWBorderWidth, &wc);

the only problem is c->w == sw won't happen since we always set c->w =
sw - 2*BORDERPX
so imho the test should be more like:

if(c->w >= waw - 2*BORDERPX && c->h >= wah - 2*BORDERPX)

           {
        c->w = sw;
        c->h = sh
        wc.border_width = 0;
}

(in this case the border will disappear from floating windows as well
if they are "very big", which is good imho)
Received on Tue Jan 16 2007 - 17:47:01 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:35:02 UTC