On Mon, 15 Jun 2009 07:19:48 -0400 Okan Demirmen <o...@demirmen.com> wrote: > On Mon 2009.06.15 at 11:46 +0200, Jan Stary wrote: > > This is 4.5-stable. > > > > In cwm, I use the C-M-f feature to toggle the > > full-screen size of a window (mostly xterms). That works. However, > > if I maximize a window with C-M-f, then move it somewhere else > > (maximized), and then later unmaximize it again with C-M-f, the window > > not only resizes to its former size, but also moves back to its > > former location. > > > > Is this intentional? > > Hi Jan, > > Yes - this is intentional; for both the max (fullscreen) and vertmax > cases; the position and dimensions get reset to pre-maximization values. > > The behavior of course can be changed, but I'm unlikely to want a knob > for such a thing, so there would have to be a consensus. >
This diff should take care of this. Any objections? Index: client.c =================================================================== RCS file: /cvs/OpenBSD/xenocara/app/cwm/client.c,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -p -r1.2 -r1.2.2.1 --- client.c 27 Jun 2009 08:20:23 -0000 1.2 +++ client.c 28 Jun 2009 16:00:58 -0000 1.2.2.1 @@ -321,6 +321,11 @@ client_resize(struct client_ctx *cc) void client_move(struct client_ctx *cc) { + if (cc->flags & (CLIENT_MAXIMIZED|CLIENT_VMAXIMIZED)) { + cc->savegeom.x = cc->geom.x; + cc->savegeom.y = cc->geom.y; + } + XMoveWindow(X_Dpy, cc->win, cc->geom.x, cc->geom.y); xev_reconfig(cc); }