diff options
| author | Dana Jansens <danakj@orodu.net> | 2013-09-01 16:48:39 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2013-09-02 14:10:37 -0400 |
| commit | f5e9df18a46240b4fdaebf540a1052e65507dcfe (patch) | |
| tree | c0497b9c48a65a0ebbc6c3bbc8248dd9ec7598e2 /openbox/moveresize.c | |
| parent | f757e7449f2184c088751c7c8d451b0db9b70981 (diff) | |
Clean up the FillToEdge action implementation
This extend the client_find_resize_directional() method to support
two growing modes, and return a bool for whether it was able to grow/shrink.
The client_find_resize_directional() method now takes an enum instead
of a bool, with two growing modes. The old mode which always tries to
grow, the a new mode that will only grow if the client's edge is not
already at a grow stopping point (ie against the edge of another window).
Diffstat (limited to 'openbox/moveresize.c')
| -rw-r--r-- | openbox/moveresize.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/openbox/moveresize.c b/openbox/moveresize.c index 333a1bea..d12a64de 100644 --- a/openbox/moveresize.c +++ b/openbox/moveresize.c @@ -795,8 +795,13 @@ static void resize_with_keys(KeySym sym, guint state) else /* if (sym == XK_Up)) */ dir = OB_DIRECTION_NORTH; - client_find_resize_directional(moveresize_client, key_resize_edge, - key_resize_edge == dir, + ObClientDirectionalResizeType resize_type = + key_resize_edge == dir ? CLIENT_RESIZE_GROW + : CLIENT_RESIZE_SHRINK; + + client_find_resize_directional(moveresize_client, + key_resize_edge, + resize_type, &x, &y, &w, &h); dw = w - moveresize_client->area.width; dh = h - moveresize_client->area.height; |
