X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=plugins%2Fresistance.c;h=56ad9d9125229debb365d78a85c1afb5b1cdeca8;hb=0327c5a77894a9a8a325631c9e18fa223e5406d0;hp=5c4d817406aa6d4b8d0d5575422aee29604f1dd2;hpb=dbdb330ad5d66030deff867f0b57ccf857497c98;p=chaz%2Fopenbox diff --git a/plugins/resistance.c b/plugins/resistance.c index 5c4d8174..56ad9d91 100644 --- a/plugins/resistance.c +++ b/plugins/resistance.c @@ -93,7 +93,7 @@ static void resist_move(Client *c, int *x, int *y) if (snapy == NULL) { if (ct >= tb && t < tb && t >= tb - resist.integer) *y = tb, snapy = target; - else if (!cb <= tt && b > tt && b <= tt + resist.integer) + else if (cb <= tt && b > tt && b <= tt + resist.integer) *y = tt - h + 1, snapy = target; if (snapy != NULL) { /* try to corner snap to the window */ @@ -244,7 +244,6 @@ static void resist_size(Client *c, int *w, int *h, Corner corn) case Corner_TopRight: dlt = lt; drb = rb + *h - c->frame->area.height; - g_message("dlt %d drb %d rb %d ab %d", dlt, drb, rb, ab); if (rb <= ab && drb > ab && drb <= ab + resist.integer) *h = ab - lt + 1; break; @@ -253,7 +252,7 @@ static void resist_size(Client *c, int *w, int *h, Corner corn) dlt = lt - *h + c->frame->area.height; drb = rb; if (lt >= at && dlt < at && dlt >= at - resist.integer) - *h = rb - al + 1; + *h = rb - at + 1; break; }