]> Dogcows Code - chaz/openbox/blobdiff - plugins/resistance.c
add the ebox style
[chaz/openbox] / plugins / resistance.c
index e60b683ea5aaf542f68cf00d96296b6547dae982..628802bd895f7aa98739e9c4530f876eae17414f 100644 (file)
@@ -6,7 +6,6 @@
 #include <glib.h>
 
 static int resistance = 10;
-static gboolean edge_resistance = TRUE; /* window-to-edge */
 static gboolean window_resistance = TRUE; /* window-to-window */
 
 static void resist(Client *c, int *x, int *y)
@@ -19,8 +18,6 @@ static void resist(Client *c, int *x, int *y)
     int w, h; /* current size */
     gboolean snapx = FALSE, snapy = FALSE;
 
-    if (!edge_resistance) return;
-
     w = c->frame->area.width;
     h = c->frame->area.height;
 
@@ -41,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;
This page took 0.02034 seconds and 4 git commands to generate.