|
|
@ -293,22 +293,17 @@ pop(Client *c) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
void |
|
|
|
resize(Client *c, Bool inc, Corner sticky) |
|
|
|
resize(Client *c, Bool sizehints, Corner sticky) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int bottom = c->y + c->h; |
|
|
|
int bottom = c->y + c->h; |
|
|
|
int right = c->x + c->w; |
|
|
|
int right = c->x + c->w; |
|
|
|
XConfigureEvent e; |
|
|
|
XConfigureEvent e; |
|
|
|
|
|
|
|
|
|
|
|
if(inc) { |
|
|
|
if(sizehints) { |
|
|
|
if(c->incw) |
|
|
|
if(c->incw) |
|
|
|
c->w -= (c->w - c->basew) % c->incw; |
|
|
|
c->w -= (c->w - c->basew) % c->incw; |
|
|
|
if(c->inch) |
|
|
|
if(c->inch) |
|
|
|
c->h -= (c->h - c->baseh) % c->inch; |
|
|
|
c->h -= (c->h - c->baseh) % c->inch; |
|
|
|
} |
|
|
|
|
|
|
|
if(c->x > sw) /* might happen on restart */ |
|
|
|
|
|
|
|
c->x = sw - c->w; |
|
|
|
|
|
|
|
if(c->y > sh) |
|
|
|
|
|
|
|
c->y = sh - c->h; |
|
|
|
|
|
|
|
if(c->minw && c->w < c->minw) |
|
|
|
if(c->minw && c->w < c->minw) |
|
|
|
c->w = c->minw; |
|
|
|
c->w = c->minw; |
|
|
|
if(c->minh && c->h < c->minh) |
|
|
|
if(c->minh && c->h < c->minh) |
|
|
@ -317,6 +312,11 @@ resize(Client *c, Bool inc, Corner sticky) |
|
|
|
c->w = c->maxw; |
|
|
|
c->w = c->maxw; |
|
|
|
if(c->maxh && c->h > c->maxh) |
|
|
|
if(c->maxh && c->h > c->maxh) |
|
|
|
c->h = c->maxh; |
|
|
|
c->h = c->maxh; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(c->x > sw) /* might happen on restart */ |
|
|
|
|
|
|
|
c->x = sw - c->w; |
|
|
|
|
|
|
|
if(c->y > sh) |
|
|
|
|
|
|
|
c->y = sh - c->h; |
|
|
|
if(sticky == TopRight || sticky == BotRight) |
|
|
|
if(sticky == TopRight || sticky == BotRight) |
|
|
|
c->x = right - c->w; |
|
|
|
c->x = right - c->w; |
|
|
|
if(sticky == BotLeft || sticky == BotRight) |
|
|
|
if(sticky == BotLeft || sticky == BotRight) |
|
|
|