theme: Port from GdkColor to GdkRGBA

GdkColor is about to be deprecated, so move to GdkRGBA instead.

https://bugzilla.gnome.org/show_bug.cgi?id=650586
This commit is contained in:
Florian Müllner
2011-05-17 20:50:40 +02:00
parent 8199699e7c
commit ce1369609f
3 changed files with 57 additions and 90 deletions

View File

@ -2612,7 +2612,7 @@ meta_frames_set_window_background (MetaFrames *frames,
if (frame_exists && style->window_background_color != NULL)
{
GdkColor color;
GdkRGBA color;
GdkVisual *visual;
meta_color_spec_render (style->window_background_color,
@ -2624,11 +2624,10 @@ meta_frames_set_window_background (MetaFrames *frames,
visual = gtk_widget_get_visual (GTK_WIDGET (frames));
if (gdk_visual_get_depth (visual) == 32) /* we have ARGB */
{
color.pixel = (color.pixel & 0xffffff) &
style->window_background_alpha << 24;
color.alpha = style->window_background_alpha / 255.0;
}
gdk_window_set_background (frame->window, &color);
gdk_window_set_background_rgba (frame->window, &color);
}
else
{