summaryrefslogtreecommitdiff
path: root/openbox/client.h
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2013-09-01 16:48:39 -0400
committerDana Jansens <danakj@orodu.net>2013-09-02 14:10:37 -0400
commitf5e9df18a46240b4fdaebf540a1052e65507dcfe (patch)
treec0497b9c48a65a0ebbc6c3bbc8248dd9ec7598e2 /openbox/client.h
parentf757e7449f2184c088751c7c8d451b0db9b70981 (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/client.h')
-rw-r--r--openbox/client.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/openbox/client.h b/openbox/client.h
index 5ae2d3d2..a753b123 100644
--- a/openbox/client.h
+++ b/openbox/client.h
@@ -489,9 +489,21 @@ void client_find_edge_directional(ObClient *self, ObDirection dir,
gint *dest, gboolean *near_edge);
void client_find_move_directional(ObClient *self, ObDirection dir,
gint *x, gint *y);
-void client_find_resize_directional(ObClient *self, ObDirection side,
- gboolean grow,
- gint *x, gint *y, gint *w, gint *h);
+
+typedef enum {
+ CLIENT_RESIZE_GROW,
+ CLIENT_RESIZE_GROW_IF_NOT_ON_EDGE,
+ CLIENT_RESIZE_SHRINK,
+} ObClientDirectionalResizeType;
+
+/*! Moves the client area passed in to grow/shrink the given edge.
+ @return TRUE if any change was made to the client area.
+*/
+gboolean client_find_resize_directional(
+ ObClient *self,
+ ObDirection side,
+ ObClientDirectionalResizeType resize_type,
+ gint *x, gint *y, gint *w, gint *h);
/*! Fullscreen's or unfullscreen's the client window
@param fs true if the window should be made fullscreen; false if it should