diff options
Diffstat (limited to 'dwm.c')
| -rw-r--r-- | dwm.c | 9 |
1 files changed, 5 insertions, 4 deletions
| @@ -913,7 +913,8 @@ manage(Window w, XWindowAttributes *wa) { | |||
| 913 | if(c->y + c->h + 2 * c->bw > sy + sh) | 913 | if(c->y + c->h + 2 * c->bw > sy + sh) |
| 914 | c->y = sy + sh - c->h - 2 * c->bw; | 914 | c->y = sy + sh - c->h - 2 * c->bw; |
| 915 | c->x = MAX(c->x, sx); | 915 | c->x = MAX(c->x, sx); |
| 916 | c->y = MAX(c->y, by == 0 ? bh : sy); | 916 | /* only fix client y-offset, if the client center might cover the bar */ |
| 917 | c->y = MAX(c->y, ((by == 0) && (c->x + (c->w / 2) >= wx) && (c->x + (c->w / 2) < wx + ww)) ? bh : sy); | ||
| 917 | c->bw = borderpx; | 918 | c->bw = borderpx; |
| 918 | } | 919 | } |
| 919 | 920 | ||
| @@ -1093,11 +1094,11 @@ resize(Client *c, int x, int y, int w, int h, Bool sizehints) { | |||
| 1093 | 1094 | ||
| 1094 | w = MAX(w, c->minw); | 1095 | w = MAX(w, c->minw); |
| 1095 | h = MAX(h, c->minh); | 1096 | h = MAX(h, c->minh); |
| 1096 | 1097 | ||
| 1097 | if (c->maxw) | 1098 | if(c->maxw) |
| 1098 | w = MIN(w, c->maxw); | 1099 | w = MIN(w, c->maxw); |
| 1099 | 1100 | ||
| 1100 | if (c->maxh) | 1101 | if(c->maxh) |
| 1101 | h = MIN(h, c->maxh); | 1102 | h = MIN(h, c->maxh); |
| 1102 | } | 1103 | } |
| 1103 | if(w <= 0 || h <= 0) | 1104 | if(w <= 0 || h <= 0) |
