diff options
| author | Dana Jansens <danakj@orodu.net> | 2013-09-01 17:37:53 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2013-09-02 14:10:37 -0400 |
| commit | e6a0beb34bfe3f445a115eb6df9276bb2692f7dd (patch) | |
| tree | 1ac15a8d43ffb2895286e55d516df68a4270d62f /openbox/client.c | |
| parent | f5e9df18a46240b4fdaebf540a1052e65507dcfe (diff) | |
Allow FillToEdge to grow when all its edges are blocked.
This change points out how useless the return value from client_find_resize_directional()
was, so it also removes that.
When all edges are blocked, the FillToEdge action will try to grow all four edges agin
without blocking any of them on their current edge. This more closely matches the
behaviour of the GrowToEdge action.
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/openbox/client.c b/openbox/client.c index d7389a65..5e6569e0 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -4535,19 +4535,16 @@ void client_find_move_directional(ObClient *self, ObDirection dir, frame_frame_gravity(self->frame, x, y); } -gboolean client_find_resize_directional( - ObClient *self, - ObDirection side, - ObClientDirectionalResizeType resize_type, - gint *x, gint *y, gint *w, gint *h) +void client_find_resize_directional(ObClient *self, + ObDirection side, + ObClientDirectionalResizeType resize_type, + gint *x, gint *y, gint *w, gint *h) { gint head; gint e, e_start, e_size, delta; gboolean near; ObDirection dir; - gboolean changed = FALSE; - gboolean grow; switch (resize_type) { case CLIENT_RESIZE_GROW: @@ -4647,27 +4644,23 @@ gboolean client_find_resize_directional( if (grow == near) --e; delta = e - RECT_RIGHT(self->frame->area); *w += delta; - changed = delta ? TRUE : changed; break; case OB_DIRECTION_WEST: if (grow == near) ++e; delta = RECT_LEFT(self->frame->area) - e; *x -= delta; *w += delta; - changed = delta ? TRUE : changed; break; case OB_DIRECTION_NORTH: if (grow == near) ++e; delta = RECT_TOP(self->frame->area) - e; *y -= delta; *h += delta; - changed = delta ? TRUE : changed; break; case OB_DIRECTION_SOUTH: if (grow == near) --e; delta = e - RECT_BOTTOM(self->frame->area); *h += delta; - changed = delta ? TRUE : changed; break; default: g_assert_not_reached(); @@ -4675,7 +4668,6 @@ gboolean client_find_resize_directional( frame_frame_gravity(self->frame, x, y); *w -= self->frame->size.left + self->frame->size.right; *h -= self->frame->size.top + self->frame->size.bottom; - return changed; } ObClient* client_under_pointer(void) |
