From 7f5347897754164c9688d7e3d882411283c13a55 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Mon, 6 Aug 2007 03:05:09 +0200 Subject: Fix some memleaks --- render/theme.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'render') diff --git a/render/theme.c b/render/theme.c index 0de3dc74..d188e6ae 100644 --- a/render/theme.c +++ b/render/theme.c @@ -115,7 +115,6 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, theme->a_menu_normal = RrAppearanceNew(inst, 0); theme->a_menu_selected = RrAppearanceNew(inst, 0); theme->a_menu_disabled = RrAppearanceNew(inst, 0); - theme->a_menu_disabled_selected = RrAppearanceNew(inst, 0); theme->a_menu_text_normal = RrAppearanceNew(inst, 1); theme->a_menu_text_selected = RrAppearanceNew(inst, 1); theme->a_menu_text_disabled = RrAppearanceNew(inst, 1); @@ -543,21 +542,6 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, OB_DEFAULT_ICON_HEIGHT, OB_DEFAULT_ICON_pixel_data); - /* the toggled hover mask = the toggled unpressed mask (i.e. no change) */ - theme->max_toggled_hover_mask = - RrPixmapMaskCopy(theme->max_toggled_mask); - theme->desk_toggled_hover_mask = - RrPixmapMaskCopy(theme->desk_toggled_mask); - theme->shade_toggled_hover_mask = - RrPixmapMaskCopy(theme->shade_toggled_mask); - /* the toggled pressed mask = the toggled unpressed mask (i.e. no change)*/ - theme->max_toggled_pressed_mask = - RrPixmapMaskCopy(theme->max_toggled_mask); - theme->desk_toggled_pressed_mask = - RrPixmapMaskCopy(theme->desk_toggled_mask); - theme->shade_toggled_pressed_mask = - RrPixmapMaskCopy(theme->shade_toggled_mask); - /* read the decoration textures */ if (!read_appearance(db, inst, "window.active.title.bg", theme->a_focused_title, -- cgit v1.2.3 From fe08a60665dfa6de0ce7c7c0eaf47e69e6a0f23e Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 5 Aug 2007 21:14:38 -0400 Subject: add a comment --- render/theme.c | 1 + 1 file changed, 1 insertion(+) (limited to 'render') diff --git a/render/theme.c b/render/theme.c index d188e6ae..3d357e38 100644 --- a/render/theme.c +++ b/render/theme.c @@ -115,6 +115,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, theme->a_menu_normal = RrAppearanceNew(inst, 0); theme->a_menu_selected = RrAppearanceNew(inst, 0); theme->a_menu_disabled = RrAppearanceNew(inst, 0); + /* a_menu_disabled_selected is copied from a_menu_selected */ theme->a_menu_text_normal = RrAppearanceNew(inst, 1); theme->a_menu_text_selected = RrAppearanceNew(inst, 1); theme->a_menu_text_disabled = RrAppearanceNew(inst, 1); -- cgit v1.2.3 From 1492bd0e7d92b3c7c1ca6adfe46dab4b8c2d3fed Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Tue, 4 Sep 2007 06:22:28 +0200 Subject: Fix shadowed variables --- render/font.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'render') diff --git a/render/font.c b/render/font.c index 8d389d8b..356b9c6e 100644 --- a/render/font.c +++ b/render/font.c @@ -278,11 +278,11 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area) c.pixel = t->color->pixel; if (t->shortcut) { - const gchar *c = t->string + t->shortcut_pos; + const gchar *s = t->string + t->shortcut_pos; t->font->shortcut_underline->start_index = t->shortcut_pos; t->font->shortcut_underline->end_index = t->shortcut_pos + - (g_utf8_next_char(c) - c); + (g_utf8_next_char(s) - s); /* the attributes are owned by the layout. re-add the attributes to the layout after changing the -- cgit v1.2.3 From 9b803f4755b73d1e3d28943c4c141493ad36317c Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Tue, 4 Sep 2007 06:23:18 +0200 Subject: Fix using None when it should be NULL --- render/mask.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'render') diff --git a/render/mask.c b/render/mask.c index 10ce8d0f..b6e3c443 100644 --- a/render/mask.c +++ b/render/mask.c @@ -47,7 +47,7 @@ void RrPixmapMaskFree(RrPixmapMask *m) void RrPixmapMaskDraw(Pixmap p, const RrTextureMask *m, const RrRect *area) { gint x, y; - if (m->mask == None) return; /* no mask given */ + if (m->mask == NULL) return; /* no mask given */ /* set the clip region */ x = area->x + (area->width - m->mask->width) / 2; -- cgit v1.2.3