Xinqi Bao's Git
projects
/
dwm.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
5d2385b
)
removed Layout->updategeom, unnecessary
author
Anselm R Garbe <
[email protected]
>
Mon, 26 May 2008 08:54:34 +0000
(09:54 +0100)
committer
Anselm R Garbe <
[email protected]
>
Mon, 26 May 2008 08:54:34 +0000
(09:54 +0100)
config.def.h
diff
|
blob
|
history
dwm.c
diff
|
blob
|
history
diff --git
a/config.def.h
b/config.def.h
index
ba45347
..
5154405
100644
(file)
--- a/
config.def.h
+++ b/
config.def.h
@@
-27,9
+27,9
@@
double mfact = 0.55;
Bool resizehints = True; /* False means respect size hints in tiled resizals */
Layout layouts[] = {
Bool resizehints = True; /* False means respect size hints in tiled resizals */
Layout layouts[] = {
- /* symbol arrange
geom
*/
- { "[]=", tile
, updatetilegeom
}, /* first entry is default */
- { "><>", NULL
, NULL
}, /* no layout function means floating behavior */
+ /* symbol arrange
function
*/
+ { "[]=", tile }, /* first entry is default */
+ { "><>", NULL }, /* no layout function means floating behavior */
};
/* key definitions */
};
/* key definitions */
diff --git
a/dwm.c
b/dwm.c
index
b61bbf5
..
0e4703e
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-105,7
+105,6
@@
typedef struct {
typedef struct {
const char *symbol;
void (*arrange)(void);
typedef struct {
const char *symbol;
void (*arrange)(void);
- void (*updategeom)(void);
} Layout;
typedef struct {
} Layout;
typedef struct {
@@
-183,7
+182,6
@@
void unmapnotify(XEvent *e);
void updatebar(void);
void updategeom(void);
void updatesizehints(Client *c);
void updatebar(void);
void updategeom(void);
void updatesizehints(Client *c);
-void updatetilegeom(void);
void updatetitle(Client *c);
void updatewmhints(Client *c);
void view(const void *arg);
void updatetitle(Client *c);
void updatewmhints(Client *c);
void view(const void *arg);
@@
-197,7
+195,6
@@
void zoom(const void *arg);
char stext[256];
int screen, sx, sy, sw, sh;
int bx, by, bw, bh, blw, wx, wy, ww, wh;
char stext[256];
int screen, sx, sy, sw, sh;
int bx, by, bw, bh, blw, wx, wy, ww, wh;
-int mx, my, mw, mh, tx, ty, tw, th;
uint seltags = 0;
int (*xerrorxlib)(Display *, XErrorEvent *);
uint numlockmask = 0;
uint seltags = 0;
int (*xerrorxlib)(Display *, XErrorEvent *);
uint numlockmask = 0;
@@
-1315,7
+1312,6
@@
setmfact(const void *arg) {
if(d < 0.1 || d > 0.9)
return;
mfact = d;
if(d < 0.1 || d > 0.9)
return;
mfact = d;
- updatetilegeom();
arrange();
}
arrange();
}
@@
-1439,7
+1435,7
@@
textnw(const char *text, uint len) {
void
tile(void) {
void
tile(void) {
- int x, y, h, w;
+ int x, y, h, w
, mx, my, mw, mh, tx, ty, tw, th
;
uint i, n;
Client *c;
uint i, n;
Client *c;
@@
-1447,6
+1443,18
@@
tile(void) {
if(n == 0)
return;
if(n == 0)
return;
+ /* master area geometry */
+ mx = wx;
+ my = wy;
+ mw = mfact * ww;
+ mh = wh;
+
+ /* tile area geometry */
+ tx = mx + mw;
+ ty = wy;
+ tw = ww - mw;
+ th = wh;
+
/* master */
c = nexttiled(clients);
/* master */
c = nexttiled(clients);
@@
-1613,11
+1621,6
@@
updategeom(void) {
bx = wx;
by = showbar ? (topbar ? wy - bh : wy + wh) : -bh;
bw = ww;
bx = wx;
by = showbar ? (topbar ? wy - bh : wy + wh) : -bh;
bw = ww;
-
- /* update layout geometries */
- for(i = 0; i < LENGTH(layouts); i++)
- if(layouts[i].updategeom)
- layouts[i].updategeom();
}
void
}
void
@@
-1672,21
+1675,6
@@
updatesizehints(Client *c) {
&& c->maxw == c->minw && c->maxh == c->minh);
}
&& c->maxw == c->minw && c->maxh == c->minh);
}
-void
-updatetilegeom(void) {
- /* master area geometry */
- mx = wx;
- my = wy;
- mw = mfact * ww;
- mh = wh;
-
- /* tile area geometry */
- tx = mx + mw;
- ty = wy;
- tw = ww - mw;
- th = wh;
-}
-
void
updatetitle(Client *c) {
if(!gettextprop(c->win, netatom[NetWMName], c->name, sizeof c->name))
void
updatetitle(Client *c) {
if(!gettextprop(c->win, netatom[NetWMName], c->name, sizeof c->name))