[gtk+/client-side-decorations] Remove usage of meta_rect()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/client-side-decorations] Remove usage of meta_rect()
- Date: Wed, 23 Jun 2010 21:14:12 +0000 (UTC)
commit 2a2795fe6ef3c9a05744029c178fa71e9f09b3cd
Author: Federico Mena Quintero <federico novell com>
Date: Thu Jun 10 15:17:31 2010 -0500
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 2d18eff..d61c2fe 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 d6f8f8d..8fc9d36 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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]