|
@ -372,10 +372,8 @@ applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact) { |
|
|
if(c->inch) |
|
|
if(c->inch) |
|
|
*h -= *h % c->inch; |
|
|
*h -= *h % c->inch; |
|
|
/* restore base dimensions */ |
|
|
/* restore base dimensions */ |
|
|
*w += c->basew; |
|
|
|
|
|
*h += c->baseh; |
|
|
|
|
|
*w = MAX(*w, c->minw); |
|
|
|
|
|
*h = MAX(*h, c->minh); |
|
|
|
|
|
|
|
|
*w = MAX(*w + c->basew, c->minw); |
|
|
|
|
|
*h = MAX(*h + c->baseh, c->minh); |
|
|
if(c->maxw) |
|
|
if(c->maxw) |
|
|
*w = MIN(*w, c->maxw); |
|
|
*w = MIN(*w, c->maxw); |
|
|
if(c->maxh) |
|
|
if(c->maxh) |
|
@ -845,7 +843,7 @@ focusin(XEvent *e) { /* there are some broken focus acquiring clients */ |
|
|
|
|
|
|
|
|
void |
|
|
void |
|
|
focusmon(const Arg *arg) { |
|
|
focusmon(const Arg *arg) { |
|
|
Monitor *m = NULL; |
|
|
|
|
|
|
|
|
Monitor *m; |
|
|
|
|
|
|
|
|
if(!mons->next) |
|
|
if(!mons->next) |
|
|
return; |
|
|
return; |
|
@ -1100,9 +1098,7 @@ manage(Window w, XWindowAttributes *wa) { |
|
|
*c = cz; |
|
|
*c = cz; |
|
|
c->win = w; |
|
|
c->win = w; |
|
|
updatetitle(c); |
|
|
updatetitle(c); |
|
|
if(XGetTransientForHint(dpy, w, &trans)) |
|
|
|
|
|
t = wintoclient(trans); |
|
|
|
|
|
if(t) { |
|
|
|
|
|
|
|
|
if(XGetTransientForHint(dpy, w, &trans) && (t = wintoclient(trans))) { |
|
|
c->mon = t->mon; |
|
|
c->mon = t->mon; |
|
|
c->tags = t->tags; |
|
|
c->tags = t->tags; |
|
|
} |
|
|
} |
|
@ -1117,7 +1113,7 @@ manage(Window w, XWindowAttributes *wa) { |
|
|
c->h = c->oldh = wa->height; |
|
|
c->h = c->oldh = wa->height; |
|
|
c->oldbw = wa->border_width; |
|
|
c->oldbw = wa->border_width; |
|
|
if(c->w == c->mon->mw && c->h == c->mon->mh) { |
|
|
if(c->w == c->mon->mw && c->h == c->mon->mh) { |
|
|
c->isfloating = 1; |
|
|
|
|
|
|
|
|
c->isfloating = True; |
|
|
c->x = c->mon->mx; |
|
|
c->x = c->mon->mx; |
|
|
c->y = c->mon->my; |
|
|
c->y = c->mon->my; |
|
|
c->bw = 0; |
|
|
c->bw = 0; |
|
@ -1273,8 +1269,8 @@ propertynotify(XEvent *e) { |
|
|
switch (ev->atom) { |
|
|
switch (ev->atom) { |
|
|
default: break; |
|
|
default: break; |
|
|
case XA_WM_TRANSIENT_FOR: |
|
|
case XA_WM_TRANSIENT_FOR: |
|
|
XGetTransientForHint(dpy, c->win, &trans); |
|
|
|
|
|
if(!c->isfloating && (c->isfloating = (wintoclient(trans) != NULL))) |
|
|
|
|
|
|
|
|
if(!c->isfloating && (XGetTransientForHint(dpy, c->win, &trans)) && |
|
|
|
|
|
(c->isfloating = (wintoclient(trans)))) |
|
|
arrange(c->mon); |
|
|
arrange(c->mon); |
|
|
break; |
|
|
break; |
|
|
case XA_WM_NORMAL_HINTS: |
|
|
case XA_WM_NORMAL_HINTS: |
|
@ -1307,7 +1303,7 @@ clientmessage(XEvent *e) { |
|
|
c->oldstate = c->isfloating; |
|
|
c->oldstate = c->isfloating; |
|
|
c->oldbw = c->bw; |
|
|
c->oldbw = c->bw; |
|
|
c->bw = 0; |
|
|
c->bw = 0; |
|
|
c->isfloating = 1; |
|
|
|
|
|
|
|
|
c->isfloating = True; |
|
|
resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh); |
|
|
resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh); |
|
|
XRaiseWindow(dpy, c->win); |
|
|
XRaiseWindow(dpy, c->win); |
|
|
} |
|
|
} |
|
|