Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
renamed MAXLEN into MAXTAGLEN (backward compliance)
[dwm.git]
/
dwm.c
diff --git
a/dwm.c
b/dwm.c
index
018f929
..
14aa808
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-153,6
+153,7
@@
void killclient(const char *arg);
void manage(Window w, XWindowAttributes *wa);
void mappingnotify(XEvent *e);
void maprequest(XEvent *e);
void manage(Window w, XWindowAttributes *wa);
void mappingnotify(XEvent *e);
void maprequest(XEvent *e);
+void maximise(void);
void movemouse(Client *c);
Client *nexttiled(Client *c);
void propertynotify(XEvent *e);
void movemouse(Client *c);
Client *nexttiled(Client *c);
void propertynotify(XEvent *e);
@@
-1002,8
+1003,6
@@
manage(Window w, XWindowAttributes *wa) {
c->tags = emallocz(TAGSZ);
c->win = w;
c->tags = emallocz(TAGSZ);
c->win = w;
- applyrules(c);
-
c->x = wa->x + sx;
c->y = wa->y + sy;
c->w = wa->width;
c->x = wa->x + sx;
c->y = wa->y + sy;
c->w = wa->width;
@@
-1038,6
+1037,8
@@
manage(Window w, XWindowAttributes *wa) {
for(t = clients; t && t->win != trans; t = t->next);
if(t)
memcpy(c->tags, t->tags, TAGSZ);
for(t = clients; t && t->win != trans; t = t->next);
if(t)
memcpy(c->tags, t->tags, TAGSZ);
+ else
+ applyrules(c);
if(!c->isfloating)
c->isfloating = (rettrans == Success) || c->isfixed;
attach(c);
if(!c->isfloating)
c->isfloating = (rettrans == Success) || c->isfixed;
attach(c);
@@
-1071,6
+1072,15
@@
maprequest(XEvent *e) {
manage(ev->window, &wa);
}
manage(ev->window, &wa);
}
+void
+maximise(void) {
+ Client *c;
+
+ domwfact = dozoom = False;
+ for(c = nexttiled(clients); c; c = nexttiled(c->next))
+ resize(c, wax, way, waw - 2 * c->border, wah - 2 * c->border, RESIZEHINTS);
+}
+
void
movemouse(Client *c) {
int x1, y1, ocx, ocy, di, nx, ny;
void
movemouse(Client *c) {
int x1, y1, ocx, ocy, di, nx, ny;
@@
-1412,7
+1422,7
@@
setlayout(const char *arg) {
}
else {
for(i = 0; i < LENGTH(layouts); i++)
}
else {
for(i = 0; i < LENGTH(layouts); i++)
- if(
arg == layouts[i].symbol
)
+ if(
!strcmp(arg, layouts[i].symbol)
)
break;
if(i == LENGTH(layouts))
return;
break;
if(i == LENGTH(layouts))
return;