~laney/ubuntu/utopic/xfvm4/trunk

« back to all changes in this revision

Viewing changes to src/mypixmap.c

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc
  • Date: 2011-01-27 21:02:27 UTC
  • Revision ID: james.westby@ubuntu.com-20110127210227-1ngf5rr6wvmua8gw
Tags: 4.8.0-0ubuntu2
* debian/patches:
  - 0001-Allow-images-without-an-alpha-channel-to-be-used-in-.patch: fix
    disappearing window buttons for PNGs without alpha channel (should fix
    the optipng'd "greybird").
  - series: add the patch above.

Show diffs side-by-side

added added

removed removed

Lines of Context:
800
800
    GdkColormap *cmap;
801
801
    gint width, height;
802
802
    gint dest_x, dest_y;
 
803
    gint alpha_threshold;
803
804
 
804
805
    g_return_val_if_fail (pm != NULL, FALSE);
805
806
    g_return_val_if_fail (pm->pixmap != None, FALSE);
858
859
    gdk_draw_pixbuf (GDK_DRAWABLE (dest_pixmap), NULL, pixbuf, 0, 0, dest_x, dest_y,
859
860
                     width, height, GDK_RGB_DITHER_NONE, 0, 0);
860
861
 
 
862
    alpha_threshold = (gdk_pixbuf_get_has_alpha (pixbuf) ? 0xFF : 0);
861
863
    gdk_pixbuf_render_threshold_alpha (pixbuf, dest_bitmap,
862
864
                                       0, 0, dest_x, dest_y,
863
 
                                       width, height, 0xFF);
 
865
                                       width, height, alpha_threshold);
864
866
 
865
867
    g_object_unref (cmap);
866
868
    g_object_unref (dest_pixmap);