[mutter] frames: Don't pass the width/height as separate args to get_client_rect



commit d4ea2bbd9c6ff32da7e93ba053b06a349eb81f99
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Jan 1 11:04:11 2015 -0800

    frames: Don't pass the width/height as separate args to get_client_rect
    
    We already have them in the fgeom.

 src/ui/frames.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 1ebb8c8..347dcd0 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -606,14 +606,12 @@ meta_ui_frame_get_borders (MetaUIFrame *frame,
  */
 static void
 get_client_rect (MetaFrameGeometry     *fgeom,
-                 int                    window_width,
-                 int                    window_height,
                  cairo_rectangle_int_t *rect)
 {
   rect->x = fgeom->borders.total.left;
   rect->y = fgeom->borders.total.top;
-  rect->width = window_width - fgeom->borders.total.right - rect->x;
-  rect->height = window_height - fgeom->borders.total.bottom - rect->y;
+  rect->width = fgeom->width - fgeom->borders.total.right - rect->x;
+  rect->height = fgeom->height - fgeom->borders.total.bottom - rect->y;
 }
 
 /* The visible frame rectangle surrounds the visible portion of the
@@ -1784,7 +1782,7 @@ get_control (MetaUIFrame *frame, int x, int y)
   cairo_rectangle_int_t client;
 
   meta_ui_frame_calc_geometry (frame, &fgeom);
-  get_client_rect (&fgeom, fgeom.width, fgeom.height, &client);
+  get_client_rect (&fgeom, &client);
 
   if (POINT_IN_RECT (x, y, client))
     return META_FRAME_CONTROL_CLIENT_AREA;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]