equal
deleted
inserted
replaced
283 void |
283 void |
284 resize(Client *c, Bool sizehints, Corner sticky) |
284 resize(Client *c, Bool sizehints, Corner sticky) |
285 { |
285 { |
286 int bottom = c->y + c->h; |
286 int bottom = c->y + c->h; |
287 int right = c->x + c->w; |
287 int right = c->x + c->w; |
288 /*XConfigureEvent e;*/ |
|
289 XWindowChanges wc; |
288 XWindowChanges wc; |
290 |
289 |
291 if(sizehints) { |
290 if(sizehints) { |
292 if(c->incw) |
291 if(c->incw) |
293 c->w -= (c->w - c->basew) % c->incw; |
292 c->w -= (c->w - c->basew) % c->incw; |
300 if(c->maxw && c->w > c->maxw) |
299 if(c->maxw && c->w > c->maxw) |
301 c->w = c->maxw; |
300 c->w = c->maxw; |
302 if(c->maxh && c->h > c->maxh) |
301 if(c->maxh && c->h > c->maxh) |
303 c->h = c->maxh; |
302 c->h = c->maxh; |
304 } |
303 } |
305 if(c->x > right) /* might happen on restart */ |
304 if(c->x > sw) /* might happen on restart */ |
306 c->x = right - c->w; |
305 c->x = sw - c->w; |
307 if(c->y > bottom) |
306 if(c->y > sh) |
308 c->y = bottom - c->h; |
307 c->y = bottom - c->h; |
309 if(sticky == TopRight || sticky == BotRight) |
308 if(sticky == TopRight || sticky == BotRight) |
310 c->x = right - c->w; |
309 c->x = right - c->w; |
311 if(sticky == BotLeft || sticky == BotRight) |
310 if(sticky == BotLeft || sticky == BotRight) |
312 c->y = bottom - c->h; |
311 c->y = bottom - c->h; |