From: Anselm R Garbe Date: Tue, 17 Jun 2008 10:20:18 +0000 (+0100) Subject: branch merge X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=commitdiff_plain;h=d8fad9bf7afd7438b0f3e82adf7132524bfedd0a;hp=ae1d865ac0cfdace4f5c6e97d8cc3cb88dfbc788 branch merge --- diff --git a/config.def.h b/config.def.h index 075c8d5..d2c5318 100644 --- a/config.def.h +++ b/config.def.h @@ -27,8 +27,8 @@ static Rule rules[] = { }; /* layout(s) */ -static float mfact = 0.55; -static Bool resizehints = False; /* False means respect size hints in tiled resizals */ +static float mfact = 0.55; +static Bool resizehints = True; /* False means respect size hints in tiled resizals */ static Layout layouts[] = { /* symbol arrange function */ diff --git a/dwm.c b/dwm.c index 64bafb7..8ae4c0e 100644 --- a/dwm.c +++ b/dwm.c @@ -913,7 +913,8 @@ manage(Window w, XWindowAttributes *wa) { if(c->y + c->h + 2 * c->bw > sy + sh) c->y = sy + sh - c->h - 2 * c->bw; c->x = MAX(c->x, sx); - c->y = MAX(c->y, by == 0 ? bh : sy); + /* only fix client y-offset, if the client center might cover the bar */ + c->y = MAX(c->y, ((by == 0) && (c->x + (c->w / 2) >= wx) && (c->x + (c->w / 2) < wx + ww)) ? bh : sy); c->bw = borderpx; } @@ -1093,11 +1094,11 @@ resize(Client *c, int x, int y, int w, int h, Bool sizehints) { w = MAX(w, c->minw); h = MAX(h, c->minh); - - if (c->maxw) + + if(c->maxw) w = MIN(w, c->maxw); - if (c->maxh) + if(c->maxh) h = MIN(h, c->maxh); } if(w <= 0 || h <= 0)