[gtkglarea] Use gdk_visual_get_depth() instead direct access



commit 22a1e7fd21498a0056bc1d9c359aa5057d0fa5a9
Author: Javier Jardón <jjardon gnome org>
Date:   Thu Mar 20 01:40:43 2014 +0000

    Use gdk_visual_get_depth() instead direct access
    
    This bumps GTK+ requirement to 2.22

 configure.ac        |    2 +-
 examples/glpixmap.c |    2 +-
 gtkgl/gdkgl.c       |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 4ff1d49..4f213dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,7 +71,7 @@ AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
 dnl
 dnl  Check for GTK libraries
 dnl
-GTK_REQUIRED_VERSION=2.0.0
+GTK_REQUIRED_VERSION=2.22
 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED_VERSION gmodule-2.0 >= $GTK_REQUIRED_VERSION)
 
 dnl
diff --git a/examples/glpixmap.c b/examples/glpixmap.c
index 5eca054..2ac5e50 100644
--- a/examples/glpixmap.c
+++ b/examples/glpixmap.c
@@ -74,7 +74,7 @@ int main(int argc, char **argv)
 
   /* pixmap */
   context  = gdk_gl_context_new(visual);
-  pixmap = gdk_pixmap_new(NULL, 80,80, visual->depth);
+  pixmap = gdk_pixmap_new(NULL, 80,80, gdk_visual_get_depth (visual));
   glpixmap = gdk_gl_pixmap_new(visual, pixmap);
   if (gdk_gl_pixmap_make_current(glpixmap, context)) {
     glMatrixMode(GL_PROJECTION);
diff --git a/gtkgl/gdkgl.c b/gtkgl/gdkgl.c
index 140bc4e..3596d0a 100644
--- a/gtkgl/gdkgl.c
+++ b/gtkgl/gdkgl.c
@@ -795,7 +795,7 @@ static XVisualInfo *get_xvisualinfo(GdkVisual *visual)
    */
   vinfo_template.visual   = GDK_VISUAL_XVISUAL(visual);
   vinfo_template.visualid = XVisualIDFromVisual(vinfo_template.visual);
-  vinfo_template.depth    = visual->depth;
+  vinfo_template.depth    = gdk_visual_get_depth(visual);
   vinfo_template.screen   = DefaultScreen(dpy);
   vi = XGetVisualInfo(dpy, VisualIDMask|VisualDepthMask|VisualScreenMask,
                      &vinfo_template, &nitems_return);


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