]> Dogcows Code - chaz/openbox/blobdiff - plugins/resistance.c
use the frame's position in the maximize function since they're converted to the...
[chaz/openbox] / plugins / resistance.c
index a92047af0da1dbbafe1f77fef31ec56522a690b0..56ad9d9125229debb365d78a85c1afb5b1cdeca8 100644 (file)
@@ -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 */
@@ -245,14 +245,14 @@ static void resist_size(Client *c, int *w, int *h, Corner corn)
         dlt = lt;
         drb = rb + *h - c->frame->area.height;
         if (rb <= ab && drb > ab && drb <= ab + resist.integer)
-            *h = ar - lt + 1;
+            *h = ab - lt + 1;
         break;
     case Corner_BottomLeft:
     case Corner_BottomRight:
         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;
     }
 
This page took 0.022697 seconds and 4 git commands to generate.