[gtkglext] Now that we require at least GTK+ 2.4, make multihead support unconditional.



commit e1055a1ca21762f72a4346913d5e81c845f01852
Author: Braden McDaniel <braden bolt endoframe net>
Date:   Fri Dec 18 01:49:10 2009 -0500

    Now that we require at least GTK+ 2.4, make multihead support unconditional.

 configure.ac                  |   72 +---
 gdk/Makefile.am               |    7 +-
 gdk/gdkglconfig.c             |   18 -
 gdk/gdkglconfig.h             |    4 -
 gdk/gdkglext-gtk20.def        | 1355 -----------------------------------------
 gdk/gdkglfont.h               |    2 -
 gdk/gdkglquery.h              |    4 -
 gdk/win32/gdkglconfig-win32.c |   56 --
 gdk/win32/gdkglfont-win32.c   |    6 -
 gdk/win32/gdkglquery-win32.c  |   10 -
 gdk/x11/gdkglconfig-x11.c     |  124 ----
 gdk/x11/gdkglfont-x11.c       |   10 -
 gdk/x11/gdkgloverlay-x11.c    |   21 -
 gdk/x11/gdkglpixmap-x11.c     |    2 -
 gdk/x11/gdkglquery-x11.c      |   20 -
 gdk/x11/gdkglwindow-x11.c     |    2 -
 gdk/x11/gdkglx.h              |    2 -
 gdkglext-uninstalled.pc.in    |    2 -
 gdkglext.pc.in                |    2 -
 19 files changed, 2 insertions(+), 1717 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9f1f931..722dac4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -298,71 +298,9 @@ LIBS="$save_LIBS"
 
 
 ##################################################
-# Checks for GDK multihead support
+# Checks for Window System
 ##################################################
 
-GDKGLEXT_MULTIHEAD_SUPPORT=no
-
-save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $GDK_CFLAGS"
-save_LIBS="$LIBS"
-LIBS="$LIBS $GDK_LIBS"
-
-AC_CHECK_HEADERS([gdk/gdkdisplay.h gdk/gdkscreen.h],
-                 [GDKGLEXT_MULTIHEAD_SUPPORT=yes],
-                 [GDKGLEXT_MULTIHEAD_SUPPORT=no])
-
-if test "x$GDKGLEXT_MULTIHEAD_SUPPORT" = "xyes"; then
-  AC_MSG_CHECKING([for gdk_display_get_default in GDK library])
-  AC_TRY_LINK([#include <gdk/gdk.h>],
-              [gdk_display_get_default();],
-              [GDKGLEXT_MULTIHEAD_SUPPORT=yes],
-              [GDKGLEXT_MULTIHEAD_SUPPORT=no])
-  AC_MSG_RESULT([$GDKGLEXT_MULTIHEAD_SUPPORT])
-fi
-
-CPPFLAGS="$save_CPPFLAGS"
-LIBS="$save_LIBS"
-
-if test "x$GDKGLEXT_MULTIHEAD_SUPPORT" = "xyes"; then
-  AC_MSG_NOTICE([GDK supports multihead])
-else
-  AC_MSG_NOTICE([GDK doesn't support multihead])
-fi
-
-AC_SUBST([GDKGLEXT_MULTIHEAD_SUPPORT])
-AM_CONDITIONAL([MULTIHEAD_SUPPORT],
-               [test "x$GDKGLEXT_MULTIHEAD_SUPPORT" = "xyes"])
-
-
-# define a MAINT-like variable REBUILD which is set if Perl
-# and awk are found, so autogenerated sources can be rebuilt
-
-AC_ARG_ENABLE([rebuilds],
-              [AS_HELP_STRING([--disable-rebuilds],
-                              [disable all source autogeneration rules])], ,
-              [enable_rebuilds=yes])
-
-REBUILD=\#
-if test "x$enable_rebuilds" = "xyes" && \
-     test -n "$PERL" && \
-     $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
-  REBUILD=
-fi
-AC_SUBST([REBUILD])
-
-case $gdktarget in
-  x11|win32) ;;
-  *) AC_MSG_ERROR([Invalid target for GDK: use x11 or win32.]);;
-esac
-AC_SUBST([gdktarget])
-
-gdkglext_targetlib=libgdkglext-$gdktarget-$GTKGLEXT_API_VERSION.la
-gtkglext_targetlib=libgtkglext-$gdktarget-$GTKGLEXT_API_VERSION.la
-
-AC_SUBST([gdkglext_targetlib])
-AC_SUBST([gtkglext_targetlib])
-
 WINDOWING_CFLAGS=""
 WINDOWING_LIBS=""
 
@@ -457,14 +395,6 @@ $gdkglext_multihead_support
 _______EOF
 
 	cat >>$outfile <<_______EOF
-
-#if !defined(GDKGLEXT_MULTIHEAD_SUPPORT) && defined(GDK_MULTIHEAD_SAFE)
-#error "Installed GdkGLExt library doesn't have multihead support."
-#endif
-
-_______EOF
-
-	cat >>$outfile <<_______EOF
 $gdkglext_need_glxfbconfigsgix_typedef
 $gdkglext_need_glxfbconfigidsgix_typedef
 $gdkglext_need_glxpbuffersgix_typedef
diff --git a/gdk/Makefile.am b/gdk/Makefile.am
index 8721588..1828b7d 100644
--- a/gdk/Makefile.am
+++ b/gdk/Makefile.am
@@ -6,19 +6,14 @@ DIST_SUBDIRS = glext x11 win32
 
 EXTRA_DIST = \
 	gdkglversion.h.in	\
-	gdkglext.def		\
-	gdkglext-gtk20.def
+	gdkglext.def
 
 if PLATFORM_WIN32
 no_undefined = -no-undefined
 endif
 
 if OS_WIN32
-if MULTIHEAD_SUPPORT
 gdkglext_def = gdkglext.def
-else
-gdkglext_def = gdkglext-gtk20.def
-endif
 gdkglext_win32_symbols = -export-symbols $(gdkglext_def)
 endif
 
diff --git a/gdk/gdkglconfig.c b/gdk/gdkglconfig.c
index 3780092..925fa54 100644
--- a/gdk/gdkglconfig.c
+++ b/gdk/gdkglconfig.c
@@ -19,9 +19,7 @@
 #include "gdkglprivate.h"
 #include "gdkglconfig.h"
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
 #include <gdk/gdk.h>
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
 gboolean _gdk_gl_config_no_standard_colormap = FALSE;
 
@@ -123,11 +121,7 @@ gdk_gl_config_new_ci (GdkScreen       *screen,
       /* XXX Assumes list[1] is where GDK_GL_BUFFER_SIZE parameter is. */
       list[1] = buf_size_list[i];
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
       glconfig = gdk_gl_config_new_for_screen (screen, list);
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-      glconfig = gdk_gl_config_new (list);
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
       if (glconfig != NULL)
         return glconfig;
@@ -189,11 +183,7 @@ gdk_gl_config_new_rgb (GdkScreen       *screen,
     }
   list[n] = GDK_GL_ATTRIB_LIST_NONE;
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
   return gdk_gl_config_new_for_screen (screen, list);
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-  return gdk_gl_config_new (list);
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 }
 
 static GdkGLConfig *
@@ -244,17 +234,11 @@ gdk_gl_config_new_by_mode (GdkGLConfigMode mode)
 {
   GdkScreen *screen;
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
   screen = gdk_screen_get_default ();
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-  screen = NULL;
-#endif
 
   return gdk_gl_config_new_by_mode_common (screen, mode);
 }
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
-
 /**
  * gdk_gl_config_new_by_mode_for_screen:
  * @screen: target screen.
@@ -272,8 +256,6 @@ gdk_gl_config_new_by_mode_for_screen (GdkScreen       *screen,
   return gdk_gl_config_new_by_mode_common (screen, mode);
 }
 
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
-
 /**
  * gdk_gl_config_get_layer_plane:
  * @glconfig: a #GdkGLConfig.
diff --git a/gdk/gdkglconfig.h b/gdk/gdkglconfig.h
index 58dbafe..d877b0e 100644
--- a/gdk/gdkglconfig.h
+++ b/gdk/gdkglconfig.h
@@ -84,19 +84,15 @@ GType        gdk_gl_config_get_type               (void);
 GdkGLConfig *gdk_gl_config_new                    (const int       *attrib_list);
 #endif /* GDK_MULTIHEAD_SAFE */
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
 GdkGLConfig *gdk_gl_config_new_for_screen         (GdkScreen       *screen,
                                                    const int       *attrib_list);
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
 #ifndef GDK_MULTIHEAD_SAFE
 GdkGLConfig *gdk_gl_config_new_by_mode            (GdkGLConfigMode  mode);
 #endif /* GDK_MULTIHEAD_SAFE */
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
 GdkGLConfig *gdk_gl_config_new_by_mode_for_screen (GdkScreen       *screen,
                                                    GdkGLConfigMode  mode);
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
 GdkScreen   *gdk_gl_config_get_screen             (GdkGLConfig     *glconfig);
 
diff --git a/gdk/gdkglfont.h b/gdk/gdkglfont.h
index 6aaca13..1ace5e5 100644
--- a/gdk/gdkglfont.h
+++ b/gdk/gdkglfont.h
@@ -31,13 +31,11 @@ PangoFont *gdk_gl_font_use_pango_font             (const PangoFontDescription *f
                                                    int                         list_base);
 #endif /* GDK_MULTIHEAD_SAFE */
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
 PangoFont *gdk_gl_font_use_pango_font_for_display (GdkDisplay                 *display,
                                                    const PangoFontDescription *font_desc,
                                                    int                         first,
                                                    int                         count,
                                                    int                         list_base);
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
 G_END_DECLS
 
diff --git a/gdk/gdkglquery.h b/gdk/gdkglquery.h
index bf71e63..a1d5982 100644
--- a/gdk/gdkglquery.h
+++ b/gdk/gdkglquery.h
@@ -28,20 +28,16 @@ G_BEGIN_DECLS
 gboolean  gdk_gl_query_extension             (void);
 #endif /* GDK_MULTIHEAD_SAFE */
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
 gboolean  gdk_gl_query_extension_for_display (GdkDisplay *display);
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
 #ifndef GDK_MULTIHEAD_SAFE
 gboolean  gdk_gl_query_version               (int        *major,
                                               int        *minor);
 #endif /* GDK_MULTIHEAD_SAFE */
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
 gboolean  gdk_gl_query_version_for_display   (GdkDisplay *display,
                                               int        *major,
                                               int        *minor);
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
 gboolean  gdk_gl_query_gl_extension          (const char *extension);
 
diff --git a/gdk/win32/gdkglconfig-win32.c b/gdk/win32/gdkglconfig-win32.c
index 50c1fbf..12fcba0 100644
--- a/gdk/win32/gdkglconfig-win32.c
+++ b/gdk/win32/gdkglconfig-win32.c
@@ -20,9 +20,7 @@
 #include "gdkglprivate-win32.h"
 #include "gdkglconfig-win32.h"
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
 #include <gdk/gdkscreen.h>
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
 static void gdk_gl_config_impl_win32_class_init (GdkGLConfigImplWin32Class *klass);
 static void gdk_gl_config_impl_win32_finalize   (GObject                   *object);
@@ -391,8 +389,6 @@ gdk_gl_config_setup_pfd (CONST PIXELFORMATDESCRIPTOR *req_pfd,
  * !!! RGB palette management should be implemented...
  */
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
-
 static GdkColormap *
 gdk_gl_config_setup_colormap (GdkScreen             *screen,
                               PIXELFORMATDESCRIPTOR *pfd,
@@ -429,46 +425,6 @@ gdk_gl_config_setup_colormap (GdkScreen             *screen,
   return NULL;
 }
 
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-
-static GdkColormap *
-gdk_gl_config_setup_colormap (GdkScreen             *screen,
-                              PIXELFORMATDESCRIPTOR *pfd,
-                              gboolean               is_rgba)
-{
-  GDK_GL_NOTE_FUNC_PRIVATE ();
-
-  if (is_rgba)
-    {
-      /*
-       * For RGBA mode.
-       */
-
-      /* Default colormap. */
-
-      GDK_GL_NOTE (MISC, g_message (" -- Colormap: system default"));
-
-      return g_object_ref (G_OBJECT (gdk_colormap_get_system ()));
-    }
-  else
-    {
-      /*
-       * For color index mode.
-       */
-
-      /* New private colormap. */
-
-      GDK_GL_NOTE (MISC, g_message (" -- Colormap: new allocated writable"));
-
-      return gdk_colormap_new (gdk_visual_get_system (), TRUE);
-    }
-
-  /* not reached */
-  return NULL;
-}
-
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
-
 static void
 gdk_gl_config_init_attrib (GdkGLConfig *glconfig)
 {
@@ -587,17 +543,11 @@ gdk_gl_config_new (const int *attrib_list)
 
   g_return_val_if_fail (attrib_list != NULL, NULL);
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
   screen = gdk_screen_get_default ();
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-  screen = NULL;
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
   return gdk_gl_config_new_common (screen, attrib_list);
 }
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
-
 GdkGLConfig *
 gdk_gl_config_new_for_screen (GdkScreen *screen,
                               const int *attrib_list)
@@ -610,8 +560,6 @@ gdk_gl_config_new_for_screen (GdkScreen *screen,
   return gdk_gl_config_new_common (screen, attrib_list);
 }
 
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
-
 GdkGLConfig *
 gdk_win32_gl_config_new_from_pixel_format (int pixel_format)
 {
@@ -657,11 +605,7 @@ gdk_win32_gl_config_new_from_pixel_format (int pixel_format)
 
   impl->pfd = pfd;
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
   impl->screen = gdk_screen_get_default ();
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-  impl->screen = NULL;
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
   /*
    * Get an appropriate colormap.
diff --git a/gdk/win32/gdkglfont-win32.c b/gdk/win32/gdkglfont-win32.c
index 880715b..0513d16 100644
--- a/gdk/win32/gdkglfont-win32.c
+++ b/gdk/win32/gdkglfont-win32.c
@@ -22,9 +22,7 @@
 #include "gdkglprivate-win32.h"
 #include "gdkglfont.h"
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
 #include <gdk/gdkdisplay.h>
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
 PangoFont *
 gdk_gl_font_use_pango_font (const PangoFontDescription *font_desc,
@@ -94,8 +92,6 @@ gdk_gl_font_use_pango_font (const PangoFontDescription *font_desc,
   return font;
 }
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
-
 PangoFont *
 gdk_gl_font_use_pango_font_for_display (GdkDisplay                 *display,
                                         const PangoFontDescription *font_desc,
@@ -105,5 +101,3 @@ gdk_gl_font_use_pango_font_for_display (GdkDisplay                 *display,
 {
   return gdk_gl_font_use_pango_font (font_desc, first, count, list_base);
 }
-
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
diff --git a/gdk/win32/gdkglquery-win32.c b/gdk/win32/gdkglquery-win32.c
index 97e4e63..36cd6f3 100644
--- a/gdk/win32/gdkglquery-win32.c
+++ b/gdk/win32/gdkglquery-win32.c
@@ -22,9 +22,7 @@
 #include "gdkglprivate-win32.h"
 #include "gdkglquery.h"
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
 #include <gdk/gdkdisplay.h>
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
 gboolean
 gdk_gl_query_extension (void)
@@ -50,8 +48,6 @@ gdk_gl_query_extension (void)
 #endif
 }
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
-
 gboolean
 gdk_gl_query_extension_for_display (GdkDisplay *display)
 {
@@ -78,8 +74,6 @@ gdk_gl_query_extension_for_display (GdkDisplay *display)
 #endif
 }
 
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
-
 gboolean
 gdk_gl_query_version (int *major,
                       int *minor)
@@ -93,8 +87,6 @@ gdk_gl_query_version (int *major,
   return TRUE;
 }
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
-
 gboolean
 gdk_gl_query_version_for_display (GdkDisplay *display,
                                   int        *major,
@@ -113,8 +105,6 @@ gdk_gl_query_version_for_display (GdkDisplay *display,
   return TRUE;
 }
 
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
-
 gboolean
 gdk_win32_gl_query_wgl_extension (GdkGLConfig *glconfig,
                                   const char  *extension)
diff --git a/gdk/x11/gdkglconfig-x11.c b/gdk/x11/gdkglconfig-x11.c
index 6707f27..c07910a 100644
--- a/gdk/x11/gdkglconfig-x11.c
+++ b/gdk/x11/gdkglconfig-x11.c
@@ -27,9 +27,7 @@
 #include "gdkgloverlay-x11.h"
 #include "gdkglconfig-x11.h"
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
 #include <gdk/gdk.h>
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
 #ifdef HAVE_LIBXMU
 
@@ -237,8 +235,6 @@ gdk_gl_config_get_std_rgb_colormap (GdkScreen   *screen,
  * Setup colormap.
  */
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
-
 static GdkColormap *
 gdk_gl_config_setup_colormap (GdkScreen   *screen,
                               XVisualInfo *xvinfo,
@@ -335,100 +331,6 @@ gdk_gl_config_setup_colormap (GdkScreen   *screen,
   return NULL;
 }
 
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-
-static GdkColormap *
-gdk_gl_config_setup_colormap (GdkScreen   *screen,
-                              XVisualInfo *xvinfo,
-                              gboolean     is_rgba,
-                              gboolean     is_mesa_glx)
-{
-  GdkColormap *colormap;
-  GdkVisual *visual;
-  GdkGLOverlayInfo overlay_info;
-  gboolean overlay_supported;
-
-  GDK_GL_NOTE_FUNC_PRIVATE ();
-
-  if (is_rgba)
-    {
-      /*
-       * For RGBA mode.
-       */
-
-      /* Try default colormap. */
-
-      colormap = gdk_colormap_get_system ();
-      visual = gdk_colormap_get_visual (colormap);
-      if (GDK_VISUAL_XVISUAL (visual)->visualid == xvinfo->visualid)
-        {
-          GDK_GL_NOTE (MISC, g_message (" -- Colormap: system default"));
-
-          g_object_ref (G_OBJECT (colormap));
-          return colormap;
-        }
-
-      /* New colormap. */
-
-      GDK_GL_NOTE (MISC, g_message (" -- Colormap: new"));
-
-      visual = gdkx_visual_get (xvinfo->visualid);
-      colormap = gdk_colormap_new (visual, FALSE);
-      return colormap;
-
-    }
-  else
-    {
-      /*
-       * For color index mode.
-       */
-
-      visual = gdkx_visual_get (xvinfo->visualid);
-
-      overlay_supported = _gdk_x11_gl_overlay_get_info (visual, &overlay_info);
-      if (overlay_supported &&
-          overlay_info.transparent_type == GDK_GL_OVERLAY_TRANSPARENT_PIXEL &&
-          overlay_info.value < xvinfo->visual->map_entries)
-        {
-
-          /*
-           * On machines where zero (or some other value in the range
-           * of 0 through map_entries-1), BadAlloc may be generated
-           * when an AllocAll overlay colormap is allocated since the
-           * transparent pixel precludes all the cells in the colormap
-           * being allocated (the transparent pixel is pre-allocated).
-           * So in this case, use XAllocColorCells to allocate
-           * map_entries-1 pixels (that is, all but the transparent pixel).
-           */
-
-          GDK_GL_NOTE (MISC, g_message (" -- Colormap: new"));
-          colormap = gdk_colormap_new (visual, FALSE);
-        }
-      else
-        {
-
-          /*
-           * If there is no transparent pixel or if the transparent
-           * pixel is outside the range of valid colormap cells (HP
-           * can implement their overlays this smart way since their
-           * transparent pixel is 255), we can AllocAll the colormap.
-           * See note above.
-           */
-
-          GDK_GL_NOTE (MISC, g_message (" -- Colormap: new allocated writable"));
-          colormap = gdk_colormap_new (visual, TRUE);
-        }
-
-      return colormap;
-
-    }
-
-  /* not reached */
-  return NULL;
-}
-
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
-
 static void
 gdk_gl_config_init_attrib (GdkGLConfig *glconfig)
 {
@@ -496,13 +398,8 @@ gdk_gl_config_new_common (GdkScreen *screen,
 
   GDK_GL_NOTE_FUNC_PRIVATE ();
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
   xdisplay = GDK_SCREEN_XDISPLAY (screen);
   screen_num = GDK_SCREEN_XNUMBER (screen);
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-  xdisplay = gdk_x11_get_default_xdisplay ();
-  screen_num = gdk_x11_get_default_screen ();
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
   GDK_GL_NOTE (MISC, _gdk_x11_gl_print_glx_info (xdisplay, screen_num));
 
@@ -592,17 +489,11 @@ gdk_gl_config_new (const int *attrib_list)
 
   g_return_val_if_fail (attrib_list != NULL, NULL);
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
   screen = gdk_screen_get_default ();
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-  screen = NULL;
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
   return gdk_gl_config_new_common (screen, attrib_list);
 }
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
-
 /**
  * gdk_gl_config_new_for_screen:
  * @screen: target screen.
@@ -626,8 +517,6 @@ gdk_gl_config_new_for_screen (GdkScreen *screen,
   return gdk_gl_config_new_common (screen, attrib_list);
 }
 
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
-
 /*
  * XVisualInfo returned by this function should be freed by XFree ().
  */
@@ -670,13 +559,8 @@ gdk_x11_gl_config_new_from_visualid_common (GdkScreen *screen,
 
   GDK_GL_NOTE_FUNC_PRIVATE ();
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
   xdisplay = GDK_SCREEN_XDISPLAY (screen);
   screen_num = GDK_SCREEN_XNUMBER (screen);
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-  xdisplay = gdk_x11_get_default_xdisplay ();
-  screen_num = gdk_x11_get_default_screen ();
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
   GDK_GL_NOTE (MISC,
                g_message (" -- GLX_VENDOR     : %s",
@@ -761,17 +645,11 @@ gdk_x11_gl_config_new_from_visualid (VisualID xvisualid)
 
   GDK_GL_NOTE_FUNC ();
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
   screen = gdk_screen_get_default ();
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-  screen = NULL;
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
   return gdk_x11_gl_config_new_from_visualid_common (screen, xvisualid);
 }
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
-
 /**
  * gdk_x11_gl_config_new_from_visualid_for_screen:
  * @screen: target screen.
@@ -793,8 +671,6 @@ gdk_x11_gl_config_new_from_visualid_for_screen (GdkScreen *screen,
   return gdk_x11_gl_config_new_from_visualid_common (screen, xvisualid);
 }
 
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
-
 /**
  * gdk_gl_config_get_screen:
  * @glconfig: a #GdkGLConfig.
diff --git a/gdk/x11/gdkglfont-x11.c b/gdk/x11/gdkglfont-x11.c
index 961c567..38c8584 100644
--- a/gdk/x11/gdkglfont-x11.c
+++ b/gdk/x11/gdkglfont-x11.c
@@ -24,9 +24,7 @@
 #include "gdkglprivate-x11.h"
 #include "gdkglfont.h"
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
 #include <gdk/gdk.h>
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
 /*
  * This code is ripped from gdk/x11/gdkfont-x11.c in GTK+.
@@ -161,18 +159,12 @@ gdk_gl_font_use_pango_font (const PangoFontDescription *font_desc,
 
   GDK_GL_NOTE_FUNC ();
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
   font_map = pango_x_font_map_for_display (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-  font_map = pango_x_font_map_for_display (gdk_x11_get_default_xdisplay ());
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
   return gdk_gl_font_use_pango_font_common (font_map, font_desc,
                                             first, count, list_base);
 }
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
-
 /**
  * gdk_gl_font_use_pango_font_for_display:
  * @display: a #GdkDisplay.
@@ -204,5 +196,3 @@ gdk_gl_font_use_pango_font_for_display (GdkDisplay                 *display,
   return gdk_gl_font_use_pango_font_common (font_map, font_desc,
                                             first, count, list_base);
 }
-
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
diff --git a/gdk/x11/gdkgloverlay-x11.c b/gdk/x11/gdkgloverlay-x11.c
index 78bbf0d..c9c3810 100644
--- a/gdk/x11/gdkgloverlay-x11.c
+++ b/gdk/x11/gdkgloverlay-x11.c
@@ -20,9 +20,7 @@
 #include "gdkglprivate-x11.h"
 #include "gdkgloverlay-x11.h"
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
 #include <gdk/gdk.h>
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
 #include <X11/Xmd.h>
 
@@ -78,9 +76,7 @@ gdk_gl_overlay_get_sov_props (GdkScreen *screen)
 {
   __SOVPropArray *sov_props;
   GdkWindow *root_window;
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
   GdkDisplay *display;
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
   Display *xdisplay;
   Atom xa_sov;
   Status status;
@@ -91,11 +87,7 @@ gdk_gl_overlay_get_sov_props (GdkScreen *screen)
 
   GDK_GL_NOTE_FUNC_PRIVATE ();
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
   root_window = gdk_screen_get_root_window (screen);
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-  root_window = gdk_get_default_root_window ();
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
   if (quark_sov_props == 0)
     quark_sov_props = g_quark_from_static_string (quark_sov_props_string);
@@ -106,14 +98,9 @@ gdk_gl_overlay_get_sov_props (GdkScreen *screen)
 
   sov_props = g_malloc (sizeof (__SOVPropArray));
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
   display = gdk_screen_get_display (screen);
   xdisplay = GDK_DISPLAY_XDISPLAY (display);
   xa_sov = gdk_x11_get_xatom_by_name_for_display (display, "SERVER_OVERLAY_VISUALS");
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-  xdisplay = gdk_x11_get_default_xdisplay ();
-  xa_sov = gdk_x11_get_xatom_by_name ("SERVER_OVERLAY_VISUALS");
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
   status = XGetWindowProperty (xdisplay, GDK_WINDOW_XWINDOW (root_window),
                                xa_sov, 0L, 1000000L, False, AnyPropertyType,
@@ -146,11 +133,7 @@ gdk_gl_overlay_get_sov_props (GdkScreen *screen)
 #ifdef G_ENABLE_DEBUG
   if (gdk_gl_debug_flags & GDK_GL_DEBUG_MISC)
     {
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
       int screen_num = GDK_SCREEN_XNUMBER (screen);
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-      int screen_num = gdk_x11_get_default_screen ();
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
       unsigned int i;
 
       g_message (" -- SERVER_OVERLAY_VISUALS: properties");
@@ -186,11 +169,7 @@ _gdk_x11_gl_overlay_get_info (GdkVisual        *visual,
 
   /* Get SOV properties. */
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
   sov_props = gdk_gl_overlay_get_sov_props (gdk_visual_get_screen (visual));
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-  sov_props = gdk_gl_overlay_get_sov_props (NULL);
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
   /* Look up SOV property for the visual. */
 
diff --git a/gdk/x11/gdkglpixmap-x11.c b/gdk/x11/gdkglpixmap-x11.c
index fcd8fb4..c7708bb 100644
--- a/gdk/x11/gdkglpixmap-x11.c
+++ b/gdk/x11/gdkglpixmap-x11.c
@@ -280,11 +280,9 @@ gdk_gl_pixmap_impl_x11_make_context_current (GdkGLDrawable *draw,
   if (glxpixmap == None || glxcontext == NULL)
     return FALSE;
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
   GDK_GL_NOTE (MISC,
     g_message (" -- Pixmap: screen number = %d",
       GDK_SCREEN_XNUMBER (gdk_drawable_get_screen (GDK_DRAWABLE (draw)))));
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
   GDK_GL_NOTE (MISC,
     g_message (" -- Pixmap: visual id = 0x%lx",
       GDK_VISUAL_XVISUAL (gdk_drawable_get_visual (GDK_DRAWABLE (draw)))->visualid));
diff --git a/gdk/x11/gdkglquery-x11.c b/gdk/x11/gdkglquery-x11.c
index cd7250b..3a8c004 100644
--- a/gdk/x11/gdkglquery-x11.c
+++ b/gdk/x11/gdkglquery-x11.c
@@ -29,9 +29,7 @@
 #include "gdkglconfig-x11.h"
 #include "gdkglquery.h"
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
 #include <gdk/gdk.h>
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
 /**
  * gdk_gl_query_extension:
@@ -44,17 +42,10 @@
 gboolean
 gdk_gl_query_extension (void)
 {
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
   return glXQueryExtension (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
                             NULL, NULL);
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-  return glXQueryExtension (gdk_x11_get_default_xdisplay (),
-                            NULL, NULL);
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 }
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
-
 /**
  * gdk_gl_query_extension_for_display:
  * @display: the #GdkDisplay where the query is sent to.
@@ -73,8 +64,6 @@ gdk_gl_query_extension_for_display (GdkDisplay *display)
                             NULL, NULL);
 }
 
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
-
 /**
  * gdk_gl_query_version:
  * @major: returns the major version number of the OpenGL extension.
@@ -92,17 +81,10 @@ gboolean
 gdk_gl_query_version (int *major,
                       int *minor)
 {
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
   return glXQueryVersion (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
                           major, minor);
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-  return glXQueryVersion (gdk_x11_get_default_xdisplay (),
-                          major, minor);
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 }
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
-
 /**
  * gdk_gl_query_version_for_display:
  * @display: the #GdkDisplay where the query is sent to.
@@ -128,8 +110,6 @@ gdk_gl_query_version_for_display (GdkDisplay *display,
                           major, minor);
 }
 
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
-
 /*
  * This code is based on __glutIsSupportedByGLX().
  */
diff --git a/gdk/x11/gdkglwindow-x11.c b/gdk/x11/gdkglwindow-x11.c
index eb2701a..1828387 100644
--- a/gdk/x11/gdkglwindow-x11.c
+++ b/gdk/x11/gdkglwindow-x11.c
@@ -236,11 +236,9 @@ gdk_gl_window_impl_x11_make_context_current (GdkGLDrawable *draw,
   if (glxwindow == None || glxcontext == NULL)
     return FALSE;
 
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
   GDK_GL_NOTE (MISC,
     g_message (" -- Window: screen number = %d",
       GDK_SCREEN_XNUMBER (gdk_drawable_get_screen (GDK_DRAWABLE (draw)))));
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
   GDK_GL_NOTE (MISC,
     g_message (" -- Window: visual id = 0x%lx",
       GDK_VISUAL_XVISUAL (gdk_drawable_get_visual (GDK_DRAWABLE (draw)))->visualid));
diff --git a/gdk/x11/gdkglx.h b/gdk/x11/gdkglx.h
index ebd2539..808dd28 100644
--- a/gdk/x11/gdkglx.h
+++ b/gdk/x11/gdkglx.h
@@ -37,10 +37,8 @@ gboolean      gdk_x11_gl_query_glx_extension      (GdkGLConfig  *glconfig,
 #ifndef GDK_MULTIHEAD_SAFE
 GdkGLConfig  *gdk_x11_gl_config_new_from_visualid            (VisualID   xvisualid);
 #endif /* GDK_MULTIHEAD_SAFE */
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
 GdkGLConfig  *gdk_x11_gl_config_new_from_visualid_for_screen (GdkScreen *screen,
                                                               VisualID   xvisualid);
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
 
 Display      *gdk_x11_gl_config_get_xdisplay      (GdkGLConfig  *glconfig);
 int           gdk_x11_gl_config_get_screen_number (GdkGLConfig  *glconfig);
diff --git a/gdkglext-uninstalled.pc.in b/gdkglext-uninstalled.pc.in
index 4558dee..8f642bd 100644
--- a/gdkglext-uninstalled.pc.in
+++ b/gdkglext-uninstalled.pc.in
@@ -1,8 +1,6 @@
 target= gdktarget@
 api_version= GTKGLEXT_API_VERSION@
 
-multihead= GDKGLEXT_MULTIHEAD_SUPPORT@
-
 Name: GdkGLExt Uninstalled
 Description: OpenGL Extension to GDK (${target} target), Not Installed
 Version: @VERSION@
diff --git a/gdkglext.pc.in b/gdkglext.pc.in
index cb789f2..4a8f031 100644
--- a/gdkglext.pc.in
+++ b/gdkglext.pc.in
@@ -6,8 +6,6 @@ includedir= includedir@
 target= gdktarget@
 api_version= GTKGLEXT_API_VERSION@
 
-multihead= GDKGLEXT_MULTIHEAD_SUPPORT@
-
 Name: GdkGLExt
 Description: OpenGL Extension to GDK (${target} target)
 Version: @VERSION@



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