← Back to team overview

ayatana-commits team mailing list archive

[Branch ~xsplash-team/xsplash/trunk] Rev 79: merge lp:~monginus00/xsplash/fix-16bpp; fixes #423632

 

Merge authors:
  Daniel Lee (longinus00)
------------------------------------------------------------
revno: 79 [merge]
committer: Cody Russell <crussell@xxxxxxxxxxxxx>
branch nick: trunk
timestamp: Fri 2009-10-02 09:13:15 -0500
message:
  merge lp:~monginus00/xsplash/fix-16bpp; fixes #423632
modified:
  src/xsplash.c


--
lp:xsplash
https://code.launchpad.net/~xsplash-team/xsplash/trunk

Your team ayatana-commits is subscribed to branch lp:xsplash.
To unsubscribe from this branch go to https://code.launchpad.net/~xsplash-team/xsplash/trunk/+edit-subscription.
=== modified file 'src/xsplash.c'
--- src/xsplash.c	2009-09-30 09:57:55 +0000
+++ src/xsplash.c	2009-10-01 20:56:55 +0000
@@ -517,6 +517,8 @@
   GtkWidget *fixed;
   gchar *logo_filename;
   gchar *throbber_filename;
+  GdkPixmap *pixmap;
+  GdkVisual *visual;
 
   priv->dbusobject = NULL;
   priv->system_bus = NULL;
@@ -578,8 +580,22 @@
   logo = gdk_pixbuf_new_from_file (logo_filename, NULL);
 
   fixed = gtk_fixed_new ();
-
-  image = gtk_image_new_from_pixbuf (pixbuf);
+  
+  visual = gdk_screen_get_system_visual (priv->screen);
+  pixmap = gdk_pixmap_new (NULL,
+                           gdk_pixbuf_get_width (pixbuf),
+                           gdk_pixbuf_get_height (pixbuf),
+                           visual->depth);
+  gdk_draw_pixbuf (pixmap,
+                   NULL,
+                   pixbuf,
+                   0, 0,
+                   0, 0,
+                   -1, -1,
+                   GDK_RGB_DITHER_MAX,
+                   0, 0);
+  image = gtk_image_new_from_pixmap (pixmap,
+                                     NULL);
   gtk_container_add (GTK_CONTAINER (fixed), image);
 
   image = gtk_image_new_from_pixbuf (logo);