Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/libdocument/ev-document-misc.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2008-03-14 11:22:01 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2008-03-14 11:22:01 (GMT)
commit85ecf6bfd1d55c0684baa0efa969bc0d23947bef (patch)
tree3ea05415deff5d87004b71031cb615b935e42ab8 /libdocument/ev-document-misc.c
parent691936c46320ab18b889ddbd368beb845a95d674 (diff)
Fix selections with poppler-splash.
2008-03-14 Carlos Garcia Campos <carlosgc@gnome.org> * libdocument/ev-document-misc.c: (ev_document_misc_surface_from_pixbuf): Fix selections with poppler-splash. svn path=/trunk/; revision=2966
Diffstat (limited to 'libdocument/ev-document-misc.c')
-rw-r--r--libdocument/ev-document-misc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libdocument/ev-document-misc.c b/libdocument/ev-document-misc.c
index 7bc793c..133a6c6 100644
--- a/libdocument/ev-document-misc.c
+++ b/libdocument/ev-document-misc.c
@@ -152,8 +152,9 @@ ev_document_misc_surface_from_pixbuf (GdkPixbuf *pixbuf)
{
cairo_surface_t *surface;
cairo_t *cr;
-
- surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
+
+ surface = cairo_image_surface_create (gdk_pixbuf_get_has_alpha (pixbuf) ?
+ CAIRO_FORMAT_ARGB32 : CAIRO_FORMAT_RGB24,
gdk_pixbuf_get_width (pixbuf),
gdk_pixbuf_get_height (pixbuf));
cr = cairo_create (surface);