X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fresist.c;h=49875fbb7ca02153b7f2d9c8dfbb75af20e298d3;hb=49b14e7bf5eb6256b69e6da66fbf7a0bca383038;hp=3ab04a98d5bc031f2446e4611adb945d276b1712;hpb=eb6a2e9c4b334f53d714a2e7f10f73c63c3d2edd;p=chaz%2Fopenbox diff --git a/openbox/resist.c b/openbox/resist.c index 3ab04a98..49875fbb 100644 --- a/openbox/resist.c +++ b/openbox/resist.c @@ -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);