Xinqi Bao's Git
projects
/
dwm.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
05c10c5
)
small change to achieve Jukka's last proposal
author
arg@mmvi <unknown>
Fri, 22 Sep 2006 11:53:28 +0000
(13:53 +0200)
committer
arg@mmvi <unknown>
Fri, 22 Sep 2006 11:53:28 +0000
(13:53 +0200)
dwm.h
patch
|
blob
|
history
view.c
patch
|
blob
|
history
diff --git
a/dwm.h
b/dwm.h
index
2298369
..
178aab8
100644
(file)
--- a/
dwm.h
+++ b/
dwm.h
@@
-77,12
+77,13
@@
struct Client {
char name[256];
int proto;
int x, y, w, h;
char name[256];
int proto;
int x, y, w, h;
+ int rx, ry, rw, rh; /* revert geometry */
int tx, ty, tw, th; /* title window geometry */
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
int grav;
long flags;
unsigned int border, weight;
int tx, ty, tw, th; /* title window geometry */
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
int grav;
long flags;
unsigned int border, weight;
- Bool isfloat;
+ Bool isfloat
, ismax
;
Bool *tags;
Client *next;
Client *prev;
Bool *tags;
Client *next;
Client *prev;
diff --git
a/view.c
b/view.c
index
bb32235
..
5667134
100644
(file)
--- a/
view.c
+++ b/
view.c
@@
-18,6
+18,12
@@
minclient() {
return min;
}
return min;
}
+static Client *
+nexttiled(Client *c) {
+ for(c = getnext(c); c && c->isfloat; c = getnext(c->next));
+ return c;
+}
+
static void
reorder() {
Client *c, *newclients, *tail;
static void
reorder() {
Client *c, *newclients, *tail;
@@
-36,10
+42,23
@@
reorder() {
clients = newclients;
}
clients = newclients;
}
-static Client *
-nexttiled(Client *c) {
- for(c = getnext(c); c && c->isfloat; c = getnext(c->next));
- return c;
+static void
+togglemax(Client *c)
+{
+ if((c->ismax = !c->ismax)) {
+ c->rx = c->x; c->x = sx;
+ c->ry = c->y; c->y = bh;
+ c->rw = c->w; c->w = sw;
+ c->rh = c->h; c->h = sh;
+ }
+ else {
+ c->x = c->rx;
+ c->y = c->ry;
+ c->w = c->w;
+ c->h = c->h;
+ }
+ resize(c, True, TopLeft);
+ while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
}
/* extern */
}
/* extern */
@@
-82,8
+101,14
@@
dotile(Arg *arg) {
w = sw - mw;
for(n = 0, c = clients; c; c = c->next)
w = sw - mw;
for(n = 0, c = clients; c; c = c->next)
- if(isvisible(c) && !c->isfloat)
- n++;
+ if(isvisible(c)) {
+ if(c->isfloat) {
+ if(c->ismax)
+ togglemax(c);
+ }
+ else
+ n++;
+ }
if(n > 1)
h = (sh - bh) / (n - 1);
if(n > 1)
h = (sh - bh) / (n - 1);
@@
-269,7
+294,6
@@
viewall(Arg *arg) {
void
zoom(Arg *arg) {
void
zoom(Arg *arg) {
- int tmp;
unsigned int n;
Client *c;
XEvent ev;
unsigned int n;
Client *c;
XEvent ev;
@@
-278,12
+302,7
@@
zoom(Arg *arg) {
return;
if(sel->isfloat || (arrange == dofloat)) {
return;
if(sel->isfloat || (arrange == dofloat)) {
- sel->x = sx;
- sel->y = bh;
- sel->w = sw;
- sel->h = sh - bh;
- resize(sel, True, TopLeft);
- while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
+ togglemax(sel);
return;
}
return;
}