[gdk-pixbuf] xlib: Honour requested depth



commit a3a6435efe4d208f704dd29f41f6492ab4d8a11b
Author: Emanuele Giaquinta <emanuele giaquinta gmail com>
Date:   Sun Oct 10 22:35:18 2010 +0100

    xlib: Honour requested depth
    
    Honour requested depth in gdk_pixbuf_xlib_init_with_depth.
    The function xlib_rgb_choose_visual_for_xprint ignores its argument;
    add it to the template so that XGetVisualInfo can do the right thing.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=631837

 contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.c b/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.c
index cb0c37f..a871586 100644
--- a/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.c
+++ b/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.c
@@ -672,7 +672,8 @@ xlib_rgb_choose_visual_for_xprint (int aDepth)
                        &win_att);
   root_visual = win_att.visual;
   template.screen = image_info->screen_num;
-  visuals = XGetVisualInfo(image_info->display, VisualScreenMask,
+  template.depth = aDepth;
+  visuals = XGetVisualInfo(image_info->display, VisualScreenMask|VisualDepthMask,
                           &template, &num_visuals);
  
   best_visual = visuals;


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