Browse Source

applied lolilolicon's floating center patch, further investigation wrt his second issue reported needed

main
garbeam@gmail.com 13 years ago
parent
commit
d5c5c52b30
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      dwm.c

+ 2
- 2
dwm.c View File

@ -632,9 +632,9 @@ configurerequest(XEvent *e) {
c->h = ev->height; c->h = ev->height;
} }
if((c->x + c->w) > m->mx + m->mw && c->isfloating) 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))) if((ev->value_mask & (CWX|CWY)) && !(ev->value_mask & (CWWidth|CWHeight)))
configure(c); configure(c);
if(ISVISIBLE(c)) if(ISVISIBLE(c))


Loading…
Cancel
Save