[mutter] theme: Remove unused "widget" parameter to frame style drawing
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] theme: Remove unused "widget" parameter to frame style drawing
- Date: Tue, 24 Apr 2012 20:56:41 +0000 (UTC)
commit b58366d3ad380ccf391d4bc6d98e2cbd7830f449
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sun Mar 11 16:00:57 2012 -0400
theme: Remove unused "widget" parameter to frame style drawing
It seems that the only usage of the "widget" parameter throughout
the entire call chain was to pass between two function calls as
mutual recursion.
https://bugzilla.gnome.org/show_bug.cgi?id=671104
src/ui/frames.c | 3 ---
src/ui/theme-private.h | 4 ----
src/ui/theme.c | 18 +++++-------------
3 files changed, 5 insertions(+), 20 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 9f53d42..ba25398 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -2196,7 +2196,6 @@ meta_frames_paint (MetaFrames *frames,
MetaUIFrame *frame,
cairo_t *cr)
{
- GtkWidget *widget;
MetaFrameFlags flags;
MetaFrameType type;
GdkPixbuf *mini_icon;
@@ -2209,7 +2208,6 @@ meta_frames_paint (MetaFrames *frames,
MetaGrabOp grab_op;
Display *display;
- widget = GTK_WIDGET (frames);
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
for (i = 0; i < META_BUTTON_TYPE_LAST; i++)
@@ -2308,7 +2306,6 @@ meta_frames_paint (MetaFrames *frames,
meta_theme_draw_frame_with_style (meta_theme_get_current (),
frame->style,
- widget,
cr,
type,
flags,
diff --git a/src/ui/theme-private.h b/src/ui/theme-private.h
index 073f56d..0f28b31 100644
--- a/src/ui/theme-private.h
+++ b/src/ui/theme-private.h
@@ -969,7 +969,6 @@ void meta_draw_op_free (MetaDrawOp *op);
void meta_draw_op_draw_with_style (const MetaDrawOp *op,
GtkStyleContext *style_gtk,
- GtkWidget *widget,
cairo_t *cr,
const MetaDrawInfo *info,
/* logical region being drawn */
@@ -980,7 +979,6 @@ void meta_draw_op_list_ref (MetaDrawOpList *op_list);
void meta_draw_op_list_unref (MetaDrawOpList *op_list);
void meta_draw_op_list_draw_with_style (const MetaDrawOpList *op_list,
GtkStyleContext *style_gtk,
- GtkWidget *widget,
cairo_t *cr,
const MetaDrawInfo *info,
MetaRectangle rect);
@@ -1011,7 +1009,6 @@ void meta_frame_style_unref (MetaFrameStyle *style);
void meta_frame_style_draw_with_style (MetaFrameStyle *style,
GtkStyleContext *style_gtk,
- GtkWidget *widget,
cairo_t *cr,
const MetaFrameGeometry *fgeom,
int client_width,
@@ -1063,7 +1060,6 @@ void meta_theme_draw_frame (MetaTheme *theme,
void meta_theme_draw_frame_with_style (MetaTheme *theme,
GtkStyleContext *style_gtk,
- GtkWidget *widget,
cairo_t *cr,
MetaFrameType type,
MetaFrameFlags flags,
diff --git a/src/ui/theme.c b/src/ui/theme.c
index e44246a..ed474d9 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -3623,7 +3623,6 @@ fill_env (MetaPositionExprEnv *env,
static void
meta_draw_op_draw_with_env (const MetaDrawOp *op,
GtkStyleContext *style_gtk,
- GtkWidget *widget,
cairo_t *cr,
const MetaDrawInfo *info,
MetaRectangle rect,
@@ -4033,7 +4032,7 @@ meta_draw_op_draw_with_env (const MetaDrawOp *op,
d_rect.height = parse_size_unchecked (op->data.op_list.height, env);
meta_draw_op_list_draw_with_style (op->data.op_list.op_list,
- style_gtk, widget, cr, info,
+ style_gtk, cr, info,
d_rect);
}
break;
@@ -4071,7 +4070,7 @@ meta_draw_op_draw_with_env (const MetaDrawOp *op,
while (tile.y < (ry + rheight))
{
meta_draw_op_list_draw_with_style (op->data.tile.op_list,
- style_gtk, widget, cr, info,
+ style_gtk, cr, info,
tile);
tile.y += tile.height;
@@ -4092,7 +4091,6 @@ meta_draw_op_draw_with_env (const MetaDrawOp *op,
void
meta_draw_op_draw_with_style (const MetaDrawOp *op,
GtkStyleContext *style_gtk,
- GtkWidget *widget,
cairo_t *cr,
const MetaDrawInfo *info,
MetaRectangle logical_region)
@@ -4101,7 +4099,7 @@ meta_draw_op_draw_with_style (const MetaDrawOp *op,
fill_env (&env, info, logical_region);
- meta_draw_op_draw_with_env (op, style_gtk, widget, cr,
+ meta_draw_op_draw_with_env (op, style_gtk, cr,
info, logical_region,
&env);
@@ -4161,7 +4159,6 @@ meta_draw_op_list_unref (MetaDrawOpList *op_list)
void
meta_draw_op_list_draw_with_style (const MetaDrawOpList *op_list,
GtkStyleContext *style_gtk,
- GtkWidget *widget,
cairo_t *cr,
const MetaDrawInfo *info,
MetaRectangle rect)
@@ -4208,7 +4205,7 @@ meta_draw_op_list_draw_with_style (const MetaDrawOpList *op_list,
else if (gdk_cairo_get_clip_rectangle (cr, NULL))
{
meta_draw_op_draw_with_env (op,
- style_gtk, widget, cr, info,
+ style_gtk, cr, info,
rect,
&env);
}
@@ -4599,7 +4596,6 @@ button_rect (MetaButtonType type,
void
meta_frame_style_draw_with_style (MetaFrameStyle *style,
GtkStyleContext *style_gtk,
- GtkWidget *widget,
cairo_t *cr,
const MetaFrameGeometry *fgeom,
int client_width,
@@ -4769,7 +4765,6 @@ meta_frame_style_draw_with_style (MetaFrameStyle *style,
m_rect = meta_rect (rect.x, rect.y, rect.width, rect.height);
meta_draw_op_list_draw_with_style (op_list,
style_gtk,
- widget,
cr,
&draw_info,
m_rect);
@@ -4811,7 +4806,6 @@ meta_frame_style_draw_with_style (MetaFrameStyle *style,
meta_draw_op_list_draw_with_style (op_list,
style_gtk,
- widget,
cr,
&draw_info,
m_rect);
@@ -5447,7 +5441,6 @@ meta_theme_get_title_scale (MetaTheme *theme,
void
meta_theme_draw_frame_with_style (MetaTheme *theme,
GtkStyleContext *style_gtk,
- GtkWidget *widget,
cairo_t *cr,
MetaFrameType type,
MetaFrameFlags flags,
@@ -5482,7 +5475,6 @@ meta_theme_draw_frame_with_style (MetaTheme *theme,
meta_frame_style_draw_with_style (style,
style_gtk,
- widget,
cr,
&fgeom,
client_width, client_height,
@@ -5507,7 +5499,7 @@ meta_theme_draw_frame (MetaTheme *theme,
GdkPixbuf *mini_icon,
GdkPixbuf *icon)
{
- meta_theme_draw_frame_with_style (theme, gtk_widget_get_style_context (widget), widget,
+ meta_theme_draw_frame_with_style (theme, gtk_widget_get_style_context (widget),
cr, type,flags,
client_width, client_height,
title_layout, text_height,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]