summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.def.h4
-rw-r--r--dwm.c9
2 files changed, 7 insertions, 6 deletions
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[] = {
27}; 27};
28 28
29/* layout(s) */ 29/* layout(s) */
30static float mfact = 0.55; 30static float mfact = 0.55;
31static Bool resizehints = False; /* False means respect size hints in tiled resizals */ 31static Bool resizehints = True; /* False means respect size hints in tiled resizals */
32 32
33static Layout layouts[] = { 33static Layout layouts[] = {
34 /* symbol arrange function */ 34 /* 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) {
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)