[dwm] GlobalMax

From: Ross Mohn <rpmohn_AT_waxandwane.org>
Date: Fri, 04 Aug 2006 16:32:24 -0400

In order to satisfy my own personal desires, I hacked up a GlobalMax
mode. It's (very) far from what I'd really want, but for me it is more
useful/efficient than the current dwm maxmode.

Basically, I deleted the Client->ismax variable everywhere. Then I added
a global ismax variable, initialized to False, and replaced the entire
togglemax function to just toggle the ismax variable. The maxing is
performed in dotile, just as it is when n == 1.

If interested, here are the diffs against the 0.6 tarball. If I continue
to like it, I will fix all the ugly bits, but it's ok for playing with.
-RPM

><><><><><><><><><><
Files dwm.h.000 and dwm.h differ
63d62
< Bool ismax;
75c74
< extern Bool running, issel;

---
> extern Bool running, issel, ismax;
><><><><><><><><><><
Files main.c.000 and main.c differ
90a91
> Bool ismax = False;
><><><><><><><><><><
Files tag.c.000 and tag.c differ
43d42
<               c->ismax = False;
78d76
<               c->ismax = False;
85c83
<                       if(n == 1) {
---
>                       if(n == 1 || ismax) {
><><><><><><><><><><
Files event.c.000 and event.c differ
130c130
<                       if(!c->ismax && (arrange == dofloat ||
c->isfloat)) {
---
>                       if(arrange == dofloat || c->isfloat) {
139c139
<                       if(!c->ismax && (arrange == dofloat ||
c->isfloat)) {
---
>                       if(arrange == dofloat || c->isfloat) {
><><><><><><><><><><
Files client.c.000 and client.c differ
72,74d71
<       if(sel->ismax)
<               togglemax(NULL);
< 
91,93d87
<       if(sel->ismax)
<               togglemax(NULL);
< 
381,383c375,376
<       int ox, oy, ow, oh;
<       XEvent ev;
< 
---
>       ismax = !ismax;
>       arrange(NULL);
385,407c378
<               return;
< 
<       if((sel->ismax = !sel->ismax)) {
<               ox = sel->x;
<               oy = sel->y;
<               ow = sel->w;
<               oh = sel->h;
<               sel->x = sx;
<               sel->y = sy + bh;
<               sel->w = sw - 2;
<               sel->h = sh - 2 - bh;
< 
<               higher(sel);
<               resize(sel, False, TopLeft);
< 
<               sel->x = ox;
<               sel->y = oy;
<               sel->w = ow;
<               sel->h = oh;
<       }
<       else
<               resize(sel, False, TopLeft);
<       while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
---
>               focus(sel);
><><><><><><><><><><
Received on Fri Aug 04 2006 - 22:32:36 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:29:57 UTC