gnome-session r4530 - trunk/gnome-session



Author: vuntz
Date: Sun Jan 20 19:16:11 2008
New Revision: 4530
URL: http://svn.gnome.org/viewvc/gnome-session?rev=4530&view=rev

Log:
2008-01-20  Vincent Untz  <vuntz gnome org>

	* splash-widget.c: (splash_widget_realize): use max dithering again,
	for 16-bits people. Fix bug #509622.
	Based on patch by Frederic Crozat <fcrozat mandriva com>


Modified:
   trunk/gnome-session/ChangeLog
   trunk/gnome-session/splash-widget.c

Modified: trunk/gnome-session/splash-widget.c
==============================================================================
--- trunk/gnome-session/splash-widget.c	(original)
+++ trunk/gnome-session/splash-widget.c	Sun Jan 20 19:16:11 2008
@@ -241,20 +241,31 @@
 		mask = NULL;
 
 		colormap = gtk_widget_get_colormap (widget);
-		gdk_pixbuf_render_pixmap_and_mask_for_colormap (sw->background,
-							 	colormap,
-								&pixmap, &mask,
-								125);
+		pixmap = gdk_pixmap_new (widget->window, 
+					 gdk_pixbuf_get_width (sw->background),
+					 gdk_pixbuf_get_height (sw->background),
+					 -1);
 
 		if (pixmap) {
 			GtkStyle *style;
 
+			/* we want dither_max for 16-bits people */
+			gdk_draw_pixbuf (pixmap, NULL, sw->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 (sw->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]