summaryrefslogtreecommitdiff
path: root/openbox/client.h
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-01 04:46:29 +0000
committerDana Jansens <danakj@orodu.net>2007-05-01 04:46:29 +0000
commit55d2916c1e24e021d9b9692d2373dc4afff4c5c2 (patch)
treef9e4a365b33d3a94ae5481a4ff11470f11482c32 /openbox/client.h
parentc991482154d390e46298afb12d213448cc120563 (diff)
a whole lot of changes to the moving/resizing code. it was broken for non-northwest gravities. now it is not. at least, that is the idea.
Diffstat (limited to 'openbox/client.h')
-rw-r--r--openbox/client.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/openbox/client.h b/openbox/client.h
index 69f5aa5f..5847c67f 100644
--- a/openbox/client.h
+++ b/openbox/client.h
@@ -348,25 +348,27 @@ gboolean client_normal(ObClient *self);
/* Returns if the window is focused */
gboolean client_focused(ObClient *self);
+/*! Convery a position/size from a given gravity to the client's true gravity
+ */
+void client_convert_gravity(ObClient *client, gint gravity, gint *x, gint *y,
+ gint w, gint h);
+
#define client_move(self, x, y) \
- client_configure(self, OB_CORNER_TOPLEFT, x, y, \
- self->area.width, self->area.height, \
+ client_configure(self, x, y, self->area.width, self->area.height, \
TRUE, TRUE)
#define client_resize(self, w, h) \
- client_configure(self, OB_CORNER_TOPLEFT, self->area.x, self->area.y, \
- w, h, TRUE, TRUE)
+ client_configure(self, self->area.x, self->area.y, w, h, TRUE, TRUE)
#define client_move_resize(self, x, y, w, h) \
- client_configure(self, OB_CORNER_TOPLEFT, x, y, w, h, TRUE, TRUE)
+ client_configure(self, x, y, w, h, TRUE, TRUE)
-#define client_configure(self, anchor, x, y, w, h, user, final) \
- client_configure_full(self, anchor, x, y, w, h, user, final, FALSE)
+#define client_configure(self, x, y, w, h, user, final) \
+ client_configure_full(self, x, y, w, h, user, final, FALSE)
/*! Figure out where a window will end up and what size it will be if you
told it to move/resize to these coordinates.
These values are what client_configure_full will give the window.
- @param anchor The corner to keep in the same position when resizing.
@param x The x coordiante of the new position for the client.
@param y The y coordiante of the new position for the client.
@param w The width component of the new size for the client.
@@ -381,14 +383,12 @@ gboolean client_focused(ObClient *self);
program requested change. For program requested changes, the
constraints are not checked.
*/
-void client_try_configure(ObClient *self, ObCorner anchor,
- gint *x, gint *y, gint *w, gint *h,
+void client_try_configure(ObClient *self, gint *x, gint *y, gint *w, gint *h,
gint *logicalw, gint *logicalh,
gboolean user);
/*! Move and/or resize the window.
This also maintains things like the client's minsize, and size increments.
- @param anchor The corner to keep in the same position when resizing.
@param x The x coordiante of the new position for the client.
@param y The y coordiante of the new position for the client.
@param w The width component of the new size for the client.
@@ -403,8 +403,7 @@ void client_try_configure(ObClient *self, ObCorner anchor,
@param force_reply Send a ConfigureNotify to the client regardless of if
the position changed.
*/
-void client_configure_full(ObClient *self, ObCorner anchor,
- gint x, gint y, gint w, gint h,
+void client_configure_full(ObClient *self, gint x, gint y, gint w, gint h,
gboolean user, gboolean final,
gboolean force_reply);