Xinqi Bao's Git
projects
/
dwm.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
d0b4575
)
applied lolilolicon's floating center patch, further investigation wrt his second...
author
[email protected]
<unknown>
Wed, 20 Jul 2011 18:33:19 +0000
(18:33 +0000)
committer
[email protected]
<unknown>
Wed, 20 Jul 2011 18:33:19 +0000
(18:33 +0000)
dwm.c
patch
|
blob
|
history
diff --git
a/dwm.c
b/dwm.c
index
f955d44
..
76bca38
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-632,9
+632,9
@@
configurerequest(XEvent *e) {
c->h = ev->height;
}
if((c->x + c->w) > m->mx + m->mw && c->isfloating)
c->h = ev->height;
}
if((c->x + c->w) > m->mx + m->mw && c->isfloating)
- c->x = m->mx + (m->mw / 2 -
c->w
/ 2); /* center in x direction */
+ c->x = m->mx + (m->mw / 2 -
WIDTH(c)
/ 2); /* center in x direction */
if((c->y + c->h) > m->my + m->mh && c->isfloating)
if((c->y + c->h) > m->my + m->mh && c->isfloating)
- c->y = m->my + (m->mh / 2 -
c->h
/ 2); /* center in y direction */
+ c->y = m->my + (m->mh / 2 -
HEIGHT(c)
/ 2); /* center in y direction */
if((ev->value_mask & (CWX|CWY)) && !(ev->value_mask & (CWWidth|CWHeight)))
configure(c);
if(ISVISIBLE(c))
if((ev->value_mask & (CWX|CWY)) && !(ev->value_mask & (CWWidth|CWHeight)))
configure(c);
if(ISVISIBLE(c))