From 53d0f2cd29a3ba3557f4ef4f2d7967c88a8a1914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gy=C3=B6rgy=20Ball=C3=B3?= Date: Thu, 19 Nov 2015 14:51:56 +0100 Subject: colorbutton: handle alpha for GdkRGBA We have to handle alpha value to avoid uninitialized variable. --- libmate-desktop/mate-colorbutton.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libmate-desktop') diff --git a/libmate-desktop/mate-colorbutton.c b/libmate-desktop/mate-colorbutton.c index 2f65e64..53a6e0d 100644 --- a/libmate-desktop/mate-colorbutton.c +++ b/libmate-desktop/mate-colorbutton.c @@ -689,6 +689,7 @@ mate_color_button_set_rgba (MateColorButton *color_button, color_button->priv->color.red = color->red * 65535; color_button->priv->color.green = color->green * 65535; color_button->priv->color.blue = color->blue * 65535; + color_button->priv->alpha = color->alpha * 65535; gtk_widget_queue_draw (color_button->priv->draw_area); @@ -757,6 +758,7 @@ mate_color_button_get_rgba (MateColorButton *color_button, color->red = color_button->priv->color.red / 65535.; color->green = color_button->priv->color.green / 65535.; color->blue = color_button->priv->color.blue / 65535.; + color->alpha = color_button->priv->alpha / 65535.; } #endif -- cgit v1.2.1