From 2a2795fe6ef3c9a05744029c178fa71e9f09b3cd Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Thu, 10 Jun 2010 15:17:31 -0500 Subject: [PATCH] Remove usage of meta_rect() This was just of the form MetaRectangle r = meta_rect (x, y, w, h); But it was now superfluous in a couple of cases where we could just use the GdkRectangle that we already had (i.e. without having to create a new MetaRectangle), and in another case where all fields were set to zero. And lo and behold, we actually don't need any meta_rectangle_*() functions in the theme code. --- gtk/theme-parser.c | 8 ++++++-- gtk/theme.c | 9 ++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/gtk/theme-parser.c b/gtk/theme-parser.c index 2d18eff8bc..d61c2fe86a 100644 --- a/gtk/theme-parser.c +++ b/gtk/theme-parser.c @@ -1609,8 +1609,12 @@ check_expression (PosToken *tokens, * it's possible we should instead guarantee that widths and heights * are at least 1. */ - - env.rect = meta_rect (0, 0, 0, 0); + + env.rect.x = 0; + env.rect.y = 0; + env.rect.width = 0; + env.rect.height = 0; + if (has_object) { env.object_width = 0; diff --git a/gtk/theme.c b/gtk/theme.c index d6f8f8d077..8fc9d36797 100644 --- a/gtk/theme.c +++ b/gtk/theme.c @@ -4525,15 +4525,13 @@ meta_frame_style_draw_with_style (MetaFrameStyle *style, if (op_list) { - GdkRectangle m_rect; - m_rect = meta_rect (rect.x, rect.y, rect.width, rect.height); meta_draw_op_list_draw_with_style (op_list, style_gtk, widget, drawable, &combined_clip, &draw_info, - m_rect); + rect); } } @@ -4567,16 +4565,13 @@ meta_frame_style_draw_with_style (MetaFrameStyle *style, if (op_list) { - GdkRectangle m_rect; - m_rect = meta_rect (rect.x, rect.y, - rect.width, rect.height); meta_draw_op_list_draw_with_style (op_list, style_gtk, widget, drawable, &combined_clip, &draw_info, - m_rect); + rect); } }