From: Dave Foster Date: Sat, 23 Aug 2008 03:13:15 +0000 (-0400) Subject: Resist edges working with margin. X-Git-Tag: mikabox-3.4.7.2~30^2~3 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=4f316a36cea8cd318ee692231eb24a03224afdec;p=mikachu%2Fopenbox.git Resist edges working with margin. --- diff --git a/openbox/resist.c b/openbox/resist.c index f21eb8e6..bfffecf8 100644 --- a/openbox/resist.c +++ b/openbox/resist.c @@ -28,6 +28,8 @@ #include +extern StrutPartial config_margins; + static gboolean resist_move_window(Rect window, Rect target, gint resist, gint *x, gint *y) @@ -104,6 +106,7 @@ void resist_move_windows(ObClient *c, gint resist, gint *x, gint *y) { GList *it; Rect dock_area; + Rect expand; if (!resist) return; @@ -124,7 +127,12 @@ void resist_move_windows(ObClient *c, gint resist, gint *x, gint *y) if (target->below && !c->below && target->skip_taskbar) continue; - if (resist_move_window(c->frame->area, target->frame->area, + RECT_SET(expand, target->frame->area.x - config_margins.left, + target->frame->area.y - config_margins.top, + target->frame->area.width + config_margins.left + config_margins.right, + target->frame->area.height + config_margins.top + config_margins.bottom); + + if (resist_move_window(c->frame->area, expand, resist, x, y)) break; }