From 4f316a36cea8cd318ee692231eb24a03224afdec Mon Sep 17 00:00:00 2001 From: Dave Foster Date: Fri, 22 Aug 2008 23:13:15 -0400 Subject: [PATCH] Resist edges working with margin. --- openbox/resist.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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; } -- 2.34.1