]> Dogcows Code - chaz/openbox/blobdiff - plugins/resistance.c
optimization!
[chaz/openbox] / plugins / resistance.c
index 68106abf2b17eeb2bb67d3cb4ecb015d50501f2a..64dfe0e70a8ad73d3a74c25ad4a06acfa25bc751 100644 (file)
@@ -38,6 +38,8 @@ static void resist(Client *c, int *x, int *y)
             int tl, tt, tr, tb; /* 1 past the target's edges on each side */
 
             target = it->data;
+            /* don't snap to self or non-visibles */
+            if (!target->frame->visible || target == c) continue; 
 
             tl = target->frame->area.x - 1;
             tt = target->frame->area.y - 1;
@@ -48,6 +50,7 @@ static void resist(Client *c, int *x, int *y)
                window edge available, without going all the way from
                bottom-to-top in the stacking list
             */
+            g_print("r %d tl %d\n", r, tl);
             if (!snapx && cl >= tr && l < tr && l >= tr - resistance)
                 *x = tr, snapx = TRUE;
             else if (!snapx && cr <= tl && r > tl && r <= tl + resistance)
This page took 0.025814 seconds and 4 git commands to generate.