On Fri, Oct 02, 2009 at 12:32:42AM +0159, Simon Nicolussi wrote:
> Hello,
>
> as a consequence to the last change to cwm(1) no borders are being drawn
> for maximized windows. This is fine as long as there's no gap defined in
> the cwmrc(5), otherwise the borders between window and gaps are missing.
> Is this behaviour intended?
Actually, kinda yes.
I use a gap and in the times when I do fullscreen an application, i
don't find the lack of a border a problem at all..
> There's another strange problem I experienced after this change: Almost
> every time I try to maximize my Firefox window its whole content freezes
> and returns back to normal as soon as I resize the window with my mouse.
> I haven't really looked into this, though.
I can't reproduce this here, anymore details?
>
> Here's a patch that addresses theses issues: Now maximized windows keep
> all four borders, but always inside the screen (and thus visible for the
> user) and Firefox behaves as before the change.
>
> Tested on amd64 but unfortunately no multi-monitor configuration.
-0-
>
> Index: client.c
> ===================================================================
> RCS file: /cvs/xenocara/app/cwm/client.c,v
> retrieving revision 1.65
> diff -u client.c
> --- client.c 25 Sep 2009 15:57:49 -0000 1.65
> +++ client.c 1 Oct 2009 21:30:27 -0000
> @@ -246,8 +246,10 @@
> calc:
> cc->geom.x = x_org + Conf.gap_left;
> cc->geom.y = y_org + Conf.gap_top;
> - cc->geom.height = ymax - (Conf.gap_top + Conf.gap_bottom);
> - cc->geom.width = xmax - (Conf.gap_left + Conf.gap_right);
> + cc->geom.height = ymax - (cc->bwidth * 2) -
> + (Conf.gap_top + Conf.gap_bottom);
> + cc->geom.width = xmax - (cc->bwidth * 2) -
> + (Conf.gap_left + Conf.gap_right);
> cc->flags |= CLIENT_DOMAXIMIZE;
> }
>
> @@ -323,7 +325,6 @@
> CLIENT_HMAXIMIZED);
>
> if (cc->flags & CLIENT_DOMAXIMIZE) {
> - cc->bwidth = 0;
> cc->flags &= ~CLIENT_DOMAXIMIZE;
> cc->flags |= CLIENT_MAXIMIZED;
> } else if (cc->flags & CLIENT_DOVMAXIMIZE) {
> @@ -332,11 +333,7 @@
> } else if (cc->flags & CLIENT_DOHMAXIMIZE) {
> cc->flags &= ~CLIENT_DOHMAXIMIZE;
> cc->flags |= CLIENT_HMAXIMIZED;
> - } else {
> - cc->bwidth = Conf.bwidth;
> }
> -
> - client_draw_border(cc);
>
> XMoveResizeWindow(X_Dpy, cc->win, cc->geom.x,
> cc->geom.y, cc->geom.width, cc->geom.height);
>
> --
> Simon Nicolussi, <[email protected]>
> http://homepage.uibk.ac.at/~csag9583/
>
--
Uncle Ed's Rule of Thumb:
Never use your thumb for a rule. You'll either hit it with a
hammer or get a splinter in it.