From bf56ca101eef6671670da37a2729a656dda197ed Mon Sep 17 00:00:00 2001 From: Dave Foster Date: Fri, 22 Aug 2008 22:58:51 -0400 Subject: [PATCH] GrowToEdge functions respect windows having a margin the same as the desktop margin. --- openbox/client.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/openbox/client.c b/openbox/client.c index 7062cabd..ae157fb4 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -55,6 +55,8 @@ #include #include +extern StrutPartial config_margins; + /*! The event mask to grab on client windows */ #define CLIENT_EVENTMASK (PropertyChangeMask | StructureNotifyMask | \ ColormapChangeMask) @@ -4198,6 +4200,7 @@ void client_find_edge_directional(ObClient *self, ObDirection dir, GList *it; Rect *a, *mon; Rect dock_area; + Rect expand; gint edge; a = screen_area(self->desktop, SCREEN_AREA_ALL_MONITORS, @@ -4251,7 +4254,11 @@ void client_find_edge_directional(ObClient *self, ObDirection dir, ob_debug("trying window %s\n", cur->title); - detect_edge(cur->frame->area, dir, my_head, my_size, my_edge_start, + RECT_SET(expand, cur->frame->area.x - config_margins.left, + cur->frame->area.y - config_margins.top, + cur->frame->area.width + config_margins.left + config_margins.right, + cur->frame->area.height + config_margins.top + config_margins.bottom); + detect_edge(expand, dir, my_head, my_size, my_edge_start, my_edge_size, dest, near_edge); } dock_get_area(&dock_area); -- 2.39.2