From fda0c79ef72e0ca4ea9b4dcd4761592eb8a0c302 Mon Sep 17 00:00:00 2001 From: monsta Date: Tue, 5 Jan 2016 21:20:27 +0300 Subject: background: use convenience function to compare colors --- mate-panel/panel-background.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mate-panel/panel-background.c b/mate-panel/panel-background.c index 9cbcc1a3..155963d0 100644 --- a/mate-panel/panel-background.c +++ b/mate-panel/panel-background.c @@ -863,6 +863,7 @@ panel_background_set_color_no_update (PanelBackground *background, #if GTK_CHECK_VERSION (3, 0, 0) if (gdk_rgba_equal (color, &background->color)) return; + background->color = *color; panel_background_update_has_alpha (background); #else @@ -884,14 +885,11 @@ panel_background_set_color (PanelBackground *background, #if GTK_CHECK_VERSION (3, 0, 0) if (gdk_rgba_equal (color, &background->color)) #else - if (background->color.gdk.red == color->gdk.red && - background->color.gdk.green == color->gdk.green && - background->color.gdk.blue == color->gdk.blue && - background->color.alpha == color->alpha) + if (gdk_color_equal (&color->gdk, &background->color.gdk) && + color->alpha == background->color.alpha) #endif return; - free_transformed_resources (background); panel_background_set_color_no_update (background, color); panel_background_transform (background); -- cgit v1.2.1