diff options
| author | Dana Jansens <danakj@orodu.net> | 2011-01-04 15:13:07 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2011-01-24 14:19:23 -0500 |
| commit | 007f0917b848fc6dda0b1b40773bc09b3f5f5668 (patch) | |
| tree | d0e5f2dd0198c0082c1314d0643c11d74d994c0d /openbox/client.c | |
| parent | 805f42e1d9051417bf6bc5fba53d2f86615ddef1 (diff) | |
Resizing removes maximization now, so don't only snap "grow to edge" to screen edges.
This caused a serious annoyance when shrinking a maximized window, it would
shrink to the other end of the monitor, effectively reducing it to its minimum
size.
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/openbox/client.c b/openbox/client.c index 0b03d9d2..6a169336 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -4325,32 +4325,26 @@ void client_find_edge_directional(ObClient *self, ObDirection dir, } /* search for edges of clients */ - 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; + 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, - my_edge_size, dest, near_edge); - } - dock_get_area(&dock_area); - detect_edge(dock_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); g_slice_free(Rect, a); } |
