]> Dogcows Code - chaz/openbox/commitdiff
symmetry..tho it's not used right now
authorDana Jansens <danakj@orodu.net>
Wed, 1 Aug 2007 23:09:42 +0000 (19:09 -0400)
committerDana Jansens <danakj@orodu.net>
Thu, 2 Aug 2007 03:19:39 +0000 (23:19 -0400)
openbox/frame.c
openbox/frame.h

index cefa389e50b58d6362ccfb78020313d5cc88b929..0f9e581f964a28f9ec02259008084e3eb6b9ebc9 100644 (file)
@@ -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;
index edf75b059ffee51033d385505b1e4f88253945e4..7fed639d8c99e57c64796420344f81b49676eb23 100644 (file)
@@ -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);
 
This page took 0.026629 seconds and 4 git commands to generate.