X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=plugins%2Fresistance.c;h=4c2dad63906b72bd5f5f75f9fcee439ba0bd8a4e;hb=5cf61ee02354c1c9f80c11f3796afc4b948055d6;hp=29d51379a204a56669b3a3032f435bba148a5a14;hpb=cbbf90a718ecc6836ef7a77b9040aebb9da348b8;p=chaz%2Fopenbox diff --git a/plugins/resistance.c b/plugins/resistance.c index 29d51379..4c2dad63 100644 --- a/plugins/resistance.c +++ b/plugins/resistance.c @@ -141,6 +141,10 @@ static void resist_size(Client *c, int *w, int *h, Corner corn) int al, at, ar, ab; /* screen boundaries */ Client *snapx = NULL, *snapy = NULL; + /* don't snap windows with size increments */ + if (c->size_inc.width > 1 || c->size_inc.height > 1) + return; + l = c->frame->area.x; r = l + c->frame->area.width - 1; t = c->frame->area.y; @@ -252,15 +256,6 @@ static void resist_size(Client *c, int *w, int *h, Corner corn) *h = b - at + 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)