aboutsummarylogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
authorgarbeam@gmail.com2011-07-20 18:33:19 +0000
committergarbeam@gmail.com2011-07-20 18:33:19 +0000
commit31cbed236db66b6a136ecabb73d63fff4dc5e851 (patch)
tree6878c7e5c6900c0e85b6e7a888b50b3f46d376c3 /dwm.c
parent5e5d31074a75a9b78d2c9ae7fa391fbcca31f6f5 (diff)
downloadaur-31cbed236db66b6a136ecabb73d63fff4dc5e851.tar.gz
applied lolilolicon's floating center patch, further investigation wrt his second issue reported needed
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dwm.c b/dwm.c
index f955d44c5ddf..76bca3839435 100644
--- 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->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)
- 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))