diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-03-28 09:40:55 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-03-28 09:40:55 +0000 |
| commit | 21442ab6e429ac648ffe1a3efba7dfb200e7fddd (patch) | |
| tree | 98f4f9c06014485bcb132d9bc7c8505aa6484455 /plugins | |
| parent | ca40e8b9eca2bba3d4aadd650722bc80542b4819 (diff) | |
round down for size increments
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/resistance.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/resistance.c b/plugins/resistance.c index 2b7bd1df..a92047af 100644 --- a/plugins/resistance.c +++ b/plugins/resistance.c @@ -255,6 +255,15 @@ static void resist_size(Client *c, int *w, int *h, Corner corn) *h = rb - al + 1; break; } + + /* round down for size increments */ + *w -= c->frame->area.width + c->frame->size.left + c->frame->size.right; + *w = *w / c->size_inc.width * c->size_inc.width; + *w += c->frame->area.width + c->frame->size.left + c->frame->size.right; + + *h -= c->frame->area.height + c->frame->size.top + c->frame->size.bottom; + *h = *h / c->size_inc.height * c->size_inc.height; + *h += c->frame->area.height + c->frame->size.top + c->frame->size.bottom; } static void event(ObEvent *e, void *foo) |
