diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-08-01 19:09:42 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-08-01 23:19:39 -0400 |
| commit | bfb0c916718cd6f68ef100841a625b06602f616b (patch) | |
| tree | f7865693e2405d618bdf2bcfa92f4e813381932b /openbox | |
| parent | 80120d04874bdbdd429016fe8db256cebac9812b (diff) | |
symmetry..tho it's not used right now
Diffstat (limited to 'openbox')
| -rw-r--r-- | openbox/frame.c | 7 | ||||
| -rw-r--r-- | openbox/frame.h | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/openbox/frame.c b/openbox/frame.c index cefa389e..0f9e581f 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -1539,6 +1539,13 @@ void frame_rect_to_frame(ObFrame *self, Rect *r) frame_client_gravity(self, &r->x, &r->y); } +void frame_rect_to_client(ObFrame *self, Rect *r) +{ + r->width -= self->size.left + self->size.right; + r->height -= self->size.top + self->size.bottom; + frame_frame_gravity(self, &r->x, &r->y); +} + static void flash_done(gpointer data) { ObFrame *self = data; diff --git a/openbox/frame.h b/openbox/frame.h index edf75b05..7fed639d 100644 --- a/openbox/frame.h +++ b/openbox/frame.h @@ -237,6 +237,10 @@ void frame_frame_gravity(ObFrame *self, gint *x, gint *y); for the frame, given its current decorations sizes */ void frame_rect_to_frame(ObFrame *self, Rect *r); +/*! Convert a rectangle in frame coordinates/sizes to what it would be for the + client, given its current decorations sizes */ +void frame_rect_to_client(ObFrame *self, Rect *r); + void frame_flash_start(ObFrame *self); void frame_flash_stop(ObFrame *self); |
