gnome-session r4828 - in branches/dbus_based: . splash



Author: fcrozat
Date: Tue Jul 22 13:19:01 2008
New Revision: 4828
URL: http://svn.gnome.org/viewvc/gnome-session?rev=4828&view=rev

Log:
2008-07-22  Frederic Crozat  <fcrozat mandriva com>

        * splash/splash-window.c:
        Dither splash background, needed for 16bpp display.
        Fix bug #544159.



Modified:
   branches/dbus_based/ChangeLog
   branches/dbus_based/splash/splash-window.c

Modified: branches/dbus_based/splash/splash-window.c
==============================================================================
--- branches/dbus_based/splash/splash-window.c	(original)
+++ branches/dbus_based/splash/splash-window.c	Tue Jul 22 13:19:01 2008
@@ -191,21 +191,32 @@
       GdkColormap *colormap;
 
       colormap = gtk_widget_get_colormap (widget);
-      gdk_pixbuf_render_pixmap_and_mask_for_colormap (splash->background,
-						      colormap,
-						      &pixmap, &mask,
-						      125);
+      pixmap = gdk_pixmap_new (widget->window, 
+			       gdk_pixbuf_get_width (splash->background),
+			       gdk_pixbuf_get_height (splash->background),
+			       -1);
 
       if (pixmap)
 	{
 	  GtkStyle *style;
 
+	  /* we want dither_max for 16-bits people */
+	  gdk_draw_pixbuf (pixmap, NULL, splash->background,
+	  		   0, 0, 0, 0, -1, -1,
+			   GDK_RGB_DITHER_MAX, 0, 0);
+
 	  style = gtk_style_copy (widget->style);
 	  style->bg_pixmap[GTK_STATE_NORMAL] = pixmap;
 
 	  gtk_widget_set_style (widget, style);
 	  g_object_unref (style);
 
+	  gdk_pixbuf_render_pixmap_and_mask_for_colormap (splash->background,
+						          colormap,
+						          NULL, 
+							  &mask,
+						          125);
+
 	  if (mask)
 	    {
 	      gdk_window_shape_combine_mask (widget->window, mask, 0, 0);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]