[metacity] theme: replace MetaRectange with GdkRectange



commit 6194256c4a135317e0926fde744aec43471f6f9c
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Jan 28 22:24:14 2016 +0200

    theme: replace MetaRectange with GdkRectange

 src/ui/preview-widget.c |    1 +
 src/ui/theme-private.h  |    5 ++---
 src/ui/theme.c          |   20 ++++++++------------
 3 files changed, 11 insertions(+), 15 deletions(-)
---
diff --git a/src/ui/preview-widget.c b/src/ui/preview-widget.c
index d45771a..ac15ad3 100644
--- a/src/ui/preview-widget.c
+++ b/src/ui/preview-widget.c
@@ -24,6 +24,7 @@
 
 #include <math.h>
 #include <gtk/gtk.h>
+#include "common.h" /* for META_MINI_ICON_WIDTH */
 #include "preview-widget.h"
 #include "theme-private.h"
 
diff --git a/src/ui/theme-private.h b/src/ui/theme-private.h
index fb616e6..c9cdeba 100644
--- a/src/ui/theme-private.h
+++ b/src/ui/theme-private.h
@@ -22,7 +22,6 @@
 #include <libmetacity/meta-gradient-spec.h>
 #include <libmetacity/meta-theme-impl.h>
 
-#include "boxes.h"
 #include "theme.h"
 
 G_BEGIN_DECLS
@@ -337,7 +336,7 @@ struct _MetaDrawInfo
 
 struct _MetaPositionExprEnv
 {
-  MetaRectangle rect;
+  GdkRectangle rect;
   /* size of an object being drawn, if it has a natural size */
   int object_width;
   int object_height;
@@ -681,7 +680,7 @@ void                   meta_draw_op_list_draw_with_style       (const MetaDrawOp
                                                                 GtkStyleContext             *style_gtk,
                                                                 cairo_t                     *cr,
                                                                 const MetaDrawInfo          *info,
-                                                                MetaRectangle                rect);
+                                                                GdkRectangle                 rect);
 void                   meta_draw_op_list_append                (MetaDrawOpList              *op_list,
                                                                 MetaDrawOp                  *op);
 gboolean               meta_draw_op_list_validate              (MetaDrawOpList              *op_list,
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 9a5a860..782bea4 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -51,6 +51,7 @@
  */
 
 #include <config.h>
+#include "common.h" /* for META_MINI_ICON_WIDTH */
 #include "theme-private.h"
 #include "util.h"
 #include <gtk/gtk.h>
@@ -2943,7 +2944,7 @@ draw_op_as_pixbuf (const MetaDrawOp    *op,
 static void
 fill_env (MetaPositionExprEnv *env,
           const MetaDrawInfo  *info,
-          MetaRectangle        logical_region)
+          GdkRectangle         logical_region)
 {
   /* FIXME this stuff could be raised into draw_op_list_draw() probably
    */
@@ -2994,7 +2995,7 @@ meta_draw_op_draw_with_env (const MetaDrawOp    *op,
                             GtkStyleContext     *style_gtk,
                             cairo_t             *cr,
                             const MetaDrawInfo  *info,
-                            MetaRectangle        rect,
+                            GdkRectangle         rect,
                             MetaPositionExprEnv *env)
 {
   GdkRGBA color;
@@ -3415,7 +3416,7 @@ meta_draw_op_draw_with_env (const MetaDrawOp    *op,
 
     case META_DRAW_OP_LIST:
       {
-        MetaRectangle d_rect;
+        GdkRectangle d_rect;
 
         d_rect.x = parse_x_position_unchecked (op->data.op_list.x, env);
         d_rect.y = parse_y_position_unchecked (op->data.op_list.y, env);
@@ -3432,7 +3433,7 @@ meta_draw_op_draw_with_env (const MetaDrawOp    *op,
       {
         int rx, ry, rwidth, rheight;
         int tile_xoffset, tile_yoffset;
-        MetaRectangle tile;
+        GdkRectangle tile;
 
         rx = parse_x_position_unchecked (op->data.tile.x, env);
         ry = parse_y_position_unchecked (op->data.tile.y, env);
@@ -3532,7 +3533,7 @@ meta_draw_op_list_draw_with_style  (const MetaDrawOpList *op_list,
                                     GtkStyleContext      *style_gtk,
                                     cairo_t              *cr,
                                     const MetaDrawInfo   *info,
-                                    MetaRectangle         rect)
+                                    GdkRectangle          rect)
 {
   int i;
   MetaPositionExprEnv env;
@@ -4212,13 +4213,11 @@ meta_frame_style_draw_with_style (MetaFrameStyle          *style,
 
           if (op_list)
             {
-              MetaRectangle m_rect;
-              m_rect = meta_rect (rect.x, rect.y, rect.width, rect.height);
               meta_draw_op_list_draw_with_style (op_list,
                                                  style_info->styles[META_STYLE_ELEMENT_WINDOW],
                                                  cr,
                                                  &draw_info,
-                                                 m_rect);
+                                                 rect);
             }
         }
 
@@ -4249,14 +4248,11 @@ meta_frame_style_draw_with_style (MetaFrameStyle          *style,
 
                   if (gdk_cairo_get_clip_rectangle (cr, NULL))
                     {
-                      MetaRectangle m_rect;
-                      m_rect = meta_rect (rect.x, rect.y,
-                                          rect.width, rect.height);
                       meta_draw_op_list_draw_with_style (op_list,
                                                          style_info->styles[META_STYLE_ELEMENT_WINDOW],
                                                          cr,
                                                          &draw_info,
-                                                         m_rect);
+                                                         rect);
                     }
                   cairo_restore (cr);
                 }


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