summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-05 21:20:27 +0300
committermonsta <[email protected]>2016-01-05 21:20:27 +0300
commitfda0c79ef72e0ca4ea9b4dcd4761592eb8a0c302 (patch)
tree011d20265be4870f065eea9ab92c077beefa9346
parentef9fc6fad88088ee3b0b769b188aaead9d8f6aeb (diff)
downloadmate-panel-fda0c79ef72e0ca4ea9b4dcd4761592eb8a0c302.tar.bz2
mate-panel-fda0c79ef72e0ca4ea9b4dcd4761592eb8a0c302.tar.xz
background: use convenience function to compare colors
-rw-r--r--mate-panel/panel-background.c8
1 files 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);