diff options
| author | Dana Jansens <danakj@orodu.net> | 2010-01-15 16:15:05 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2010-01-15 16:15:05 -0500 |
| commit | 1e72cf5e4547968825d29e6f32491b4486cf186e (patch) | |
| tree | 3b3535467fb56a304a8303712ebad0e13e3a34c0 | |
| parent | 8d7ab691b8bbbeca42484d61375387ef5c2f4878 (diff) | |
make edge detection for maximized windows only look at the edges of screens
| -rw-r--r-- | openbox/client.c | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/openbox/client.c b/openbox/client.c index 909112ea..2f9cfb8f 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -4257,26 +4257,33 @@ void client_find_edge_directional(ObClient *self, ObDirection dir, } /* search for edges of clients */ - for (it = client_list; it; it = g_list_next(it)) { - ObClient *cur = it->data; + if (((dir == OB_DIRECTION_NORTH || dir == OB_DIRECTION_SOUTH) && + !self->max_vert) || + ((dir == OB_DIRECTION_EAST || dir == OB_DIRECTION_WEST) && + !self->max_horz)) + { + for (it = client_list; it; it = g_list_next(it)) { + ObClient *cur = it->data; - /* skip windows to not bump into */ - if (cur == self) - continue; - if (cur->iconic) - continue; - if (self->desktop != cur->desktop && cur->desktop != DESKTOP_ALL && - cur->desktop != screen_desktop) - continue; + /* skip windows to not bump into */ + if (cur == self) + continue; + if (cur->iconic) + continue; + if (self->desktop != cur->desktop && cur->desktop != DESKTOP_ALL && + cur->desktop != screen_desktop) + continue; - ob_debug("trying window %s", cur->title); + ob_debug("trying window %s", cur->title); - detect_edge(cur->frame->area, dir, my_head, my_size, my_edge_start, + detect_edge(cur->frame->area, dir, my_head, my_size, my_edge_start, + my_edge_size, dest, near_edge); + } + dock_get_area(&dock_area); + detect_edge(dock_area, dir, my_head, my_size, my_edge_start, my_edge_size, dest, near_edge); } - dock_get_area(&dock_area); - detect_edge(dock_area, dir, my_head, my_size, my_edge_start, - my_edge_size, dest, near_edge); + g_free(a); } |
