]> Dogcows Code - chaz/openbox/blobdiff - openbox/resist.c
option to make dragging and findedge ignore windows on lower layers
[chaz/openbox] / openbox / resist.c
index c88f594849ff63be7078ba1409df42719c6dff20..42c03675c7ca722f995c99b840eb79662e9db75b 100644 (file)
@@ -54,9 +54,14 @@ void resist_move_windows(ObClient *c, gint *x, gint *y)
             if (!WINDOW_IS_CLIENT(it->data))
                 continue;
             target = it->data;
+
             /* don't snap to self or non-visibles */
             if (!target->frame->visible || target == c) continue; 
 
+            /* don't snap to windows in layers beneath */
+            if(target->layer < c->layer && !config_resist_layers_below)
+                continue;
+
             tl = RECT_LEFT(target->frame->area) - 1;
             tt = RECT_TOP(target->frame->area) - 1;
             tr = RECT_RIGHT(target->frame->area) + 1;
@@ -195,6 +200,10 @@ void resist_size_windows(ObClient *c, gint *w, gint *h, ObCorner corn)
             /* don't snap to invisibles or ourself */
             if (!target->frame->visible || target == c) continue;
 
+            /* don't snap to windows in layers beneath */
+            if(target->layer < c->layer && !config_resist_layers_below)
+                continue;
+
             tl = RECT_LEFT(target->frame->area);
             tr = RECT_RIGHT(target->frame->area);
             tt = RECT_TOP(target->frame->area);
This page took 0.0201 seconds and 4 git commands to generate.