summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client.c20
-rw-r--r--dwm.h2
2 files changed, 11 insertions, 11 deletions
diff --git a/client.c b/client.c
index 89ca5fb..4afa705 100644
--- a/client.c
+++ b/client.c
@@ -293,30 +293,30 @@ pop(Client *c)
293} 293}
294 294
295void 295void
296resize(Client *c, Bool inc, Corner sticky) 296resize(Client *c, Bool sizehints, Corner sticky)
297{ 297{
298 int bottom = c->y + c->h; 298 int bottom = c->y + c->h;
299 int right = c->x + c->w; 299 int right = c->x + c->w;
300 XConfigureEvent e; 300 XConfigureEvent e;
301 301
302 if(inc) { 302 if(sizehints) {
303 if(c->incw) 303 if(c->incw)
304 c->w -= (c->w - c->basew) % c->incw; 304 c->w -= (c->w - c->basew) % c->incw;
305 if(c->inch) 305 if(c->inch)
306 c->h -= (c->h - c->baseh) % c->inch; 306 c->h -= (c->h - c->baseh) % c->inch;
307 if(c->minw && c->w < c->minw)
308 c->w = c->minw;
309 if(c->minh && c->h < c->minh)
310 c->h = c->minh;
311 if(c->maxw && c->w > c->maxw)
312 c->w = c->maxw;
313 if(c->maxh && c->h > c->maxh)
314 c->h = c->maxh;
307 } 315 }
308 if(c->x > sw) /* might happen on restart */ 316 if(c->x > sw) /* might happen on restart */
309 c->x = sw - c->w; 317 c->x = sw - c->w;
310 if(c->y > sh) 318 if(c->y > sh)
311 c->y = sh - c->h; 319 c->y = sh - c->h;
312 if(c->minw && c->w < c->minw)
313 c->w = c->minw;
314 if(c->minh && c->h < c->minh)
315 c->h = c->minh;
316 if(c->maxw && c->w > c->maxw)
317 c->w = c->maxw;
318 if(c->maxh && c->h > c->maxh)
319 c->h = c->maxh;
320 if(sticky == TopRight || sticky == BotRight) 320 if(sticky == TopRight || sticky == BotRight)
321 c->x = right - c->w; 321 c->x = right - c->w;
322 if(sticky == BotLeft || sticky == BotRight) 322 if(sticky == BotLeft || sticky == BotRight)
diff --git a/dwm.h b/dwm.h
index 8a7237c..1439f59 100644
--- a/dwm.h
+++ b/dwm.h
@@ -106,7 +106,7 @@ extern void killclient(Arg *arg);
106extern void lower(Client *c); 106extern void lower(Client *c);
107extern void manage(Window w, XWindowAttributes *wa); 107extern void manage(Window w, XWindowAttributes *wa);
108extern void pop(Client *c); 108extern void pop(Client *c);
109extern void resize(Client *c, Bool inc, Corner sticky); 109extern void resize(Client *c, Bool sizehints, Corner sticky);
110extern void setsize(Client *c); 110extern void setsize(Client *c);
111extern void settitle(Client *c); 111extern void settitle(Client *c);
112extern void togglemax(Arg *arg); 112extern void togglemax(Arg *arg);