]> Dogcows Code - chaz/openbox/blobdiff - openbox/resist.c
add the moveto action
[chaz/openbox] / openbox / resist.c
index 3ab04a98d5bc031f2446e4611adb945d276b1712..49875fbb7ca02153b7f2d9c8dfbb75af20e298d3 100644 (file)
@@ -36,7 +36,7 @@ void resist_move_windows(ObClient *c, gint resist, gint *x, gint *y)
 
     if (!resist) return;
 
-    frame_client_gravity(c->frame, x, y, c->area.width, c->area.height);
+    frame_client_gravity(c->frame, x, y);
 
     w = c->frame->area.width;
     h = c->frame->area.height;
@@ -61,6 +61,8 @@ void resist_move_windows(ObClient *c, gint resist, gint *x, gint *y)
 
         /* don't snap to self or non-visibles */
         if (!target->frame->visible || target == c) continue; 
+        /* don't snap to windows set to below and skip_taskbar (desklets) */
+        if (target->below && !c->below && target->skip_taskbar) continue;
 
         tl = RECT_LEFT(target->frame->area) - 1;
         tt = RECT_TOP(target->frame->area) - 1;
@@ -111,7 +113,7 @@ void resist_move_windows(ObClient *c, gint resist, gint *x, gint *y)
         if (snapx && snapy) break;
     }
 
-    frame_frame_gravity(c->frame, x, y, c->area.width, c->area.height);
+    frame_frame_gravity(c->frame, x, y);
 }
 
 void resist_move_monitors(ObClient *c, gint resist, gint *x, gint *y)
@@ -127,7 +129,7 @@ void resist_move_monitors(ObClient *c, gint resist, gint *x, gint *y)
 
     if (!resist) return;
 
-    frame_client_gravity(c->frame, x, y, c->area.width, c->area.height);
+    frame_client_gravity(c->frame, x, y);
 
     w = c->frame->area.width;
     h = c->frame->area.height;
@@ -186,7 +188,7 @@ void resist_move_monitors(ObClient *c, gint resist, gint *x, gint *y)
         g_free(parea);
     }
 
-    frame_frame_gravity(c->frame, x, y, c->area.width, c->area.height);
+    frame_frame_gravity(c->frame, x, y);
 }
 
 void resist_size_windows(ObClient *c, gint resist, gint *w, gint *h,
@@ -217,6 +219,8 @@ void resist_size_windows(ObClient *c, gint resist, gint *w, gint *h,
 
         /* don't snap to invisibles or ourself */
         if (!target->frame->visible || target == c) continue; 
+        /* don't snap to windows set to below and skip_taskbar (desklets) */
+        if (target->below && !c->below && target->skip_taskbar) continue;
 
         tl = RECT_LEFT(target->frame->area);
         tr = RECT_RIGHT(target->frame->area);
This page took 0.025438 seconds and 4 git commands to generate.