rpms/gcompris/devel gcompris-7.4-xf86vidmode.patch,1.3,1.4

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Sat May 13 12:38:58 UTC 2006


Author: jwrdegoede

Update of /cvs/extras/rpms/gcompris/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24103

Modified Files:
	gcompris-7.4-xf86vidmode.patch 
Log Message:
Minor patch cleanup

gcompris-7.4-xf86vidmode.patch:

Index: gcompris-7.4-xf86vidmode.patch
===================================================================
RCS file: /cvs/extras/rpms/gcompris/devel/gcompris-7.4-xf86vidmode.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- gcompris-7.4-xf86vidmode.patch	11 May 2006 14:43:20 -0000	1.3
+++ gcompris-7.4-xf86vidmode.patch	13 May 2006 12:38:57 -0000	1.4
@@ -1,550 +1,217 @@
---- gcompris-7.4/src/gcompris/gcompris.h.xf86vm	2006-03-02 00:02:09.000000000 +0100
-+++ gcompris-7.4/src/gcompris/gcompris.h	2006-05-11 09:42:18.000000000 +0200
-@@ -159,6 +159,12 @@
+--- gcompris-7.4/configure.xf86vm	2006-04-12 01:13:49.000000000 +0200
++++ gcompris-7.4/configure	2006-05-13 14:16:46.000000000 +0200
+@@ -1094,7 +1094,7 @@
+   --disable-sdltest       Do not try to compile and run a test SDL program
+   --disable-glibtest      do not try to compile and run a test GLIB program
+   --disable-rpath         do not hardcode runtime library paths
+-  --disable-xrandr        Turn off xrandr
++  --disable-xf86vidmode   Turn off xf86vidmode
+   --enable-debug          Turn on debugging messages
+   --disable-sqlite        Turn off sqlite (will disable profile)
+   --enable-py-build-only  Skip python modules tests. (Useful if you just need
+@@ -23630,7 +23630,7 @@
+ /usr/openwin/share/include'
  
- void gcompris_confirm_stop (void);
+ if test "$ac_x_includes" = no; then
+-  # Guess where to find include files, by looking for Intrinsic.h.
++  # Guess where to find include files, by looking for Xlib.h.
+   # First, try using that file with no special directory specified.
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+@@ -23638,7 +23638,7 @@
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+-#include <X11/Intrinsic.h>
++#include <X11/Xlib.h>
+ _ACEOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+@@ -23665,7 +23665,7 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
  
-+/* Use these instead of the gnome_canvas ones for proper fullscreen mousegrab
-+   handling. */
-+int gcompris_canvas_item_grab (GnomeCanvasItem *item, unsigned int event_mask,
-+			    GdkCursor *cursor, guint32 etime);
-+void gcompris_canvas_item_ungrab (GnomeCanvasItem *item, guint32 etime);
-+
- /* Trace Log */
- #define GCOMPRIS_LOG_STATUS_PASSED    "PASSED"
- #define GCOMPRIS_LOG_STATUS_FAILED    "FAILED"
---- gcompris-7.4/src/gcompris/gcompris.c.xf86vm	2006-03-02 00:47:10.000000000 +0100
-+++ gcompris-7.4/src/gcompris/gcompris.c	2006-05-11 09:42:18.000000000 +0200
-@@ -33,12 +33,13 @@
+   for ac_dir in $ac_x_header_dirs; do
+-  if test -r "$ac_dir/X11/Intrinsic.h"; then
++  if test -r "$ac_dir/X11/Xlib.h"; then
+     ac_x_includes=$ac_dir
+     break
+   fi
+@@ -23686,11 +23686,11 @@
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+-#include <X11/Intrinsic.h>
++#include <X11/Xlib.h>
+ int
+ main ()
+ {
+-XtMalloc (0)
++XrmInitialize ()
+   ;
+   return 0;
+ }
+@@ -23769,23 +23769,23 @@
+ echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
+ fi
  
- #include "cursor.h"
+-# Check whether --enable-xrandr or --disable-xrandr was given.
+-if test "${enable_xrandr+set}" = set; then
+-  enableval="$enable_xrandr"
+-  USE_XRANDR="$enableval"
++# Check whether --enable-xf86vidmode or --disable-xf86vidmode was given.
++if test "${enable_xf86vidmode+set}" = set; then
++  enableval="$enable_xf86vidmode"
++  USE_XF86VM="$enableval"
+ else
+-  USE_XRANDR="yes"
++  USE_XF86VM="yes"
+ fi;
+-found_randr=no
+-if test "x$USE_XRANDR" == "xyes" ; then
+-  RANDR_LIBS=
+-  echo "$as_me:$LINENO: checking for XRRSetScreenConfigAndRate in -lXrandr" >&5
+-echo $ECHO_N "checking for XRRSetScreenConfigAndRate in -lXrandr... $ECHO_C" >&6
+-if test "${ac_cv_lib_Xrandr_XRRSetScreenConfigAndRate+set}" = set; then
++found_xf86vidmode=no
++if test "x$USE_XF86VM" == "xyes" ; then
++  XF86VM_LIBS=
++  echo "$as_me:$LINENO: checking for XF86VidModeQueryExtension in -lXxf86vm" >&5
++echo $ECHO_N "checking for XF86VidModeQueryExtension in -lXxf86vm... $ECHO_C" >&6
++if test "${ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lXrandr -L$x_libraries $ALL_X_LIBS  $LIBS"
++LIBS="-lXxf86vm -L$x_libraries $ALL_X_LIBS  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+@@ -23799,11 +23799,11 @@
+ #endif
+ /* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+-char XRRSetScreenConfigAndRate ();
++char XF86VidModeQueryExtension ();
+ int
+ main ()
+ {
+-XRRSetScreenConfigAndRate ();
++XF86VidModeQueryExtension ();
+   ;
+   return 0;
+ }
+@@ -23830,23 +23830,23 @@
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+-  ac_cv_lib_Xrandr_XRRSetScreenConfigAndRate=yes
++  ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
--/* For XRANDR Support */
--#ifdef XRANDR
-+/* For XF86_VIDMODE Support */
-+#ifdef XF86_VIDMODE
- #include <gdk/gdkx.h>
+-ac_cv_lib_Xrandr_XRRSetScreenConfigAndRate=no
++ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension=no
+ fi
+ rm -f conftest.err conftest.$ac_objext \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRSetScreenConfigAndRate" >&5
+-echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRSetScreenConfigAndRate" >&6
+-if test $ac_cv_lib_Xrandr_XRRSetScreenConfigAndRate = yes; then
+-  echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
+-echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6
+-if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
++echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension" >&5
++echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension" >&6
++if test $ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension = yes; then
++  echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
++echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
++if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+@@ -23857,7 +23857,7 @@
+ /* end confdefs.h.  */
  #include <X11/Xlib.h>
+ 
 -#include <X11/extensions/Xrandr.h>
--#include <X11/extensions/Xrender.h>
-+#include <X11/Xutil.h>
-+#include <X11/extensions/xf86dga.h>
-+#include <X11/extensions/xf86vmode.h>   
- #endif
++#include <X11/extensions/xf86vmode.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+@@ -23881,38 +23881,38 @@
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+-  ac_cv_header_X11_extensions_Xrandr_h=yes
++  ac_cv_header_X11_extensions_xf86vmode_h=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- #if defined _WIN32 || defined __WIN32__
-@@ -104,7 +105,7 @@
- static int popt_aalias		   = FALSE;
- static int popt_difficulty_filter  = FALSE;
- static int popt_debug		   = FALSE;
--static int popt_noxrandr	   = FALSE;
-+static int popt_noxf86vm	   = FALSE;
- static char *popt_root_menu        = NULL;
- static char *popt_local_activity   = NULL;
- static int popt_administration	   = FALSE;
-@@ -139,8 +140,8 @@
-    N_("Print the version of " PACKAGE), NULL},
-   {"antialiased", '\0', POPT_ARG_NONE, &popt_aalias, 0,
-    N_("Use the antialiased canvas (slower)."), NULL},
--  {"noxrandr", 'x', POPT_ARG_NONE, &popt_noxrandr, 0,
--   N_("Disable XRANDR (No screen resolution change)."), NULL},
-+  {"noxf86vm", 'x', POPT_ARG_NONE, &popt_noxf86vm, 0,
-+   N_("Disable XF86VidMode (No screen resolution change)."), NULL},
-   {"root-menu", 'l', POPT_ARG_STRING, &popt_root_menu, 0,
-    N_("Run gcompris with local menu (e.g -l /reading will let you play only activities in the reading directory, -l /boards/connect4 only the connect4 activity)"), NULL},
-   {"local-activity", 'L', POPT_ARG_STRING, &popt_local_activity, 0,
-@@ -184,29 +185,19 @@
- };
+-ac_cv_header_X11_extensions_Xrandr_h=no
++ac_cv_header_X11_extensions_xf86vmode_h=no
+ fi
+ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
+-echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6
+-if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
+-  RANDR_LIBS="-L$x_libraries -lXrandr" found_randr=yes
++echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
++echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
++if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
++  XF86VM_LIBS="-L$x_libraries -lXxf86vm" found_xf86vidmode=yes
+ fi
  
- /* XRandr Stuff */
--#ifdef XRANDR
--typedef struct 
-+#ifdef XF86_VIDMODE
-+static struct 
- {
--  gboolean                xr_lock_updates;
-+  int vidmode_available;
-+  XF86VidModeModeInfo orig_mode;
-+  int orig_viewport_x;
-+  int orig_viewport_y;
-+  int width;
-+  int height;
-+} XF86VidModeData = { 0, { 0 }, 0, 0 };
  
--  XRRScreenConfiguration *xr_screen_conf;
--
--  XRRScreenSize          *xr_sizes;
--  int                     xr_nsize;
--  SizeID	          xr_current_size;
--
--  Rotation                xr_rotations;
--  Rotation                xr_current_rotation;
--
--} XRANDRData; 
--
--static SizeID		 xr_previous_size;
--static gboolean		 xr_previous_size_set = FALSE;
--static XRANDRData	*xrandr = NULL;
--
--static void xrandr_init ( XRANDRData *xrandr );
--static void xrandr_get_config ( XRANDRData *xrandr );
--static void xrandr_set_config( XRANDRData  *xrandr );
-+static void xf86_vidmode_init( void );
-+static void xf86_vidmode_set_fullscreen( int state );
- #endif
+ fi
  
- /****************************************************************************/
-@@ -441,8 +432,8 @@
-   gint screen_height, screen_width;
-   GtkWidget *vbox;
  
--#ifdef XRANDR
--  xrandr = g_new0 (XRANDRData, 1);
-+#ifdef XF86_VIDMODE
-+  xf86_vidmode_init();
- #endif
+-  if test "x$found_randr" = "xno"; then
+-     { echo "$as_me:$LINENO: \"Suitable Xrandr extension library not found - you need at least X 4.3. Will not use xrandr for fullscreen.\"" >&5
+-echo "$as_me: \"Suitable Xrandr extension library not found - you need at least X 4.3. Will not use xrandr for fullscreen.\"" >&6;}
++  if test "x$found_xf86vidmode" = "xno"; then
++     { echo "$as_me:$LINENO: \"Suitable XF86VidMode extension library not found - Will not use xf86vidmode for fullscreen.\"" >&5
++echo "$as_me: \"Suitable XF86VidMode extension library not found - Will not use xf86vidmode for fullscreen.\"" >&6;}
+   else
  
-   gcompris_set_fullscreen(properties->fullscreen);
-@@ -450,10 +441,10 @@
-   screen_height = gdk_screen_height();
-   screen_width  = gdk_screen_width();
+ cat >>confdefs.h <<_ACEOF
+-#define XRANDR 1
++#define XF86_VIDMODE 1
+ _ACEOF
  
--#ifdef XRANDR
--  if(properties->fullscreen && !properties->noxrandr) {
--    screen_height = xrandr->xr_sizes[xrandr->xr_current_size].height;
--    screen_width  = xrandr->xr_sizes[xrandr->xr_current_size].width;
-+#ifdef XF86_VIDMODE
-+  if(properties->fullscreen && !properties->noxf86vm) {
-+    screen_width  = XF86VidModeData.width;
-+    screen_height = XF86VidModeData.height;
-   }
- #endif
+   fi
+ fi
  
-@@ -811,39 +802,11 @@
-  */
- void gcompris_set_fullscreen(gboolean state)
- {
--
-+#ifdef XF86_VIDMODE
-+  xf86_vidmode_set_fullscreen(state);
-+#endif
-   if(state)
-     {
--#ifdef XRANDR
--      gint i;
--      /* Search the 800x600 Resolution */
--      if(properties->fullscreen && !properties->noxrandr) {
--	
--	g_warning("XRANDR Is compiled in. Searching a good resolution");
--
--	/* Check if XRANDR is available */
--	if (!properties->noxrandr) {
--	  xrandr_get_config ( xrandr );
--	  xr_previous_size = (SizeID)xrandr->xr_current_size;
--	  for (i = 0; i < xrandr->xr_nsize; i++) {
--	    if(xrandr->xr_sizes[i].width == BOARDWIDTH &&
--	       xrandr->xr_sizes[i].height == BOARDHEIGHT+BARHEIGHT) 
--	      {
--		xrandr->xr_current_size = (SizeID)i;
--		xr_previous_size_set = TRUE;
--		break;
--	      }
--	  }
--	}
--
--	/* Set the Fullscreen now */
--	if(xr_previous_size_set) 
--	  {
--	    if(is_mapped)
--	      xrandr_set_config( xrandr );
--	  }
--      }
--#endif
-       gdk_window_set_decorations (window->window, 0);
-       gdk_window_set_functions (window->window, 0);
-       gtk_widget_set_uposition (window, 0, 0);
-@@ -851,20 +814,6 @@
-     }
-   else
-     { 
--#ifdef XRANDR
--      /* Set back the original screen size */
--      if(xr_previous_size_set && !properties->noxrandr)
--	{
--	  /* Need to refresh our config or xrandr api will reject us */
--	  if(xrandr)
--	    {
--	      xrandr_get_config ( xrandr );
--	      xrandr->xr_current_size = (SizeID)xr_previous_size;
--	      xrandr_set_config( xrandr );
--	    }
--	}
--      xr_previous_size_set = FALSE;
--#endif
-       /* The hide must be done at least for KDE */
-       gtk_widget_hide (window);
-       gdk_window_set_decorations (window->window, GDK_DECOR_ALL);
-@@ -876,6 +825,42 @@
+-LDFLAGS="${LDFLAGS} ${RANDR_LIBS}"
++LDFLAGS="${LDFLAGS} ${XF86VM_LIBS}"
  
- }
+ ALL_LINGUAS="am ar az bg ca cs da de el en_CA en_GB es et eu fi fr ga gu he hi hr hu it ka lt mk ml ms nb ne nl nn pa pl pt pt_BR ro ru rw sk sl sq sr sr at Latn sv tr vi wa zh_CN zh_TW"
  
-+/* Use these instead of the gnome_canvas ones for proper fullscreen mousegrab
-+   handling. */
-+int gcompris_canvas_item_grab (GnomeCanvasItem *item, unsigned int event_mask,
-+			    GdkCursor *cursor, guint32 etime)
-+{
-+  int retval;
-+  
-+  retval = gnome_canvas_item_grab(item, event_mask, cursor, etime);
-+  if (retval != GDK_GRAB_SUCCESS)
-+    return retval;
-+  
-+#ifdef XF86_VIDMODE
-+  /* When fullscreen override mouse grab with our own which
-+     confines the cursor to our fullscreen window */
-+  if (properties->fullscreen && !properties->noxf86vm)
-+    if (gdk_pointer_grab(item->canvas->layout.bin_window, FALSE, event_mask,
-+          window->window, cursor, etime+1) != GDK_GRAB_SUCCESS) 
-+      g_warning("Pointer grab failed");
-+#endif
-+  
-+  return retval;
-+}
-+
-+void gcompris_canvas_item_ungrab (GnomeCanvasItem *item, guint32 etime)
-+{
-+  gnome_canvas_item_ungrab(item, etime);
-+#ifdef XF86_VIDMODE
-+  /* When fullscreen restore the normal mouse grab which avoids
-+     scrolling the virtual desktop */
-+  if (properties->fullscreen && !properties->noxf86vm)
-+    if (gdk_pointer_grab(window->window, TRUE, 0, window->window, NULL,
-+          etime+1) != GDK_GRAB_SUCCESS)
-+      g_warning("Pointer grab failed");
-+#endif
-+}
-+
- void gcompris_exit()
- {
-   /* Do not loopback in exit */
-@@ -1044,68 +1029,131 @@
-     g_printerr ("%s: %s\n\n", "gcompris", message);
- }
+@@ -28651,7 +28651,7 @@
+ echo "SDL LIBS                                 = found"
+ fi
  
--#ifdef XRANDR
-+#ifdef XF86_VIDMODE
- /*
-- * XRANDR STUFF
-- * ------------
-+ * XF86VidMode STUFF
-+ * -----------------
-  */
- static void
--xrandr_init ( XRANDRData *data )
-+xf86_vidmode_init ( void )
- {
--  if(data==NULL)
-+  int i,j;
-+  XF86VidModeModeLine *l = (XF86VidModeModeLine *)((char *)
-+    &XF86VidModeData.orig_mode + sizeof XF86VidModeData.orig_mode.dotclock);
-+  
-+  if (properties->noxf86vm)
-     return;
--
--  data->xr_screen_conf = XRRGetScreenInfo (GDK_DISPLAY(), GDK_ROOT_WINDOW());
--
--  if (data->xr_screen_conf == NULL)
-+  
-+  if (!XF86VidModeQueryVersion(GDK_DISPLAY(), &i, &j))
-+    properties->noxf86vm = TRUE;
-+  else if (!XF86VidModeQueryExtension(GDK_DISPLAY(), &i, &j))
-+    properties->noxf86vm = TRUE;
-+  else if (!XF86VidModeGetModeLine(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
-+            gdk_screen_get_default()), &XF86VidModeData.orig_mode.dotclock, l))
-+    properties->noxf86vm = TRUE;
-+  else if (!XF86VidModeGetViewPort(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
-+            gdk_screen_get_default()), &XF86VidModeData.orig_viewport_x,
-+            &XF86VidModeData.orig_viewport_x))
-+    properties->noxf86vm = TRUE;
-+  
-+  if (properties->noxf86vm)
-+      g_warning("XF86VidMode not available");
-+  else
-     {
--      g_warning("XRANDR not available");
--      properties->noxrandr = TRUE;
-+      XF86VidModeData.width  = XF86VidModeData.orig_mode.hdisplay;
-+      XF86VidModeData.height = XF86VidModeData.orig_mode.vdisplay;
-+      g_warning("XF86VidMode support enabled");
-     }
--  else
--      g_warning("XRANDR support enabled");
-- }
--
--static void
--xrandr_get_config ( XRANDRData *data )
--{
--  if(data==NULL)
--    return;
--
--  xrandr_init (data);
--
--  data->xr_current_size = XRRConfigCurrentConfiguration (data->xr_screen_conf, 
--							 &data->xr_current_rotation);
--
--  data->xr_sizes = XRRConfigSizes(data->xr_screen_conf, &data->xr_nsize);
--  
--  data->xr_rotations = XRRConfigRotations(data->xr_screen_conf,
--					  &data->xr_current_rotation);
- }
+-echo "XRANDR option  (--enable-xrandr)         = $found_randr"
++echo "XF86VM option  (--enable-xf86vidmode)    = $found_xf86vidmode"
  
-+
- static void
--xrandr_set_config( XRANDRData  *data )
-+xf86_vidmode_set_fullscreen ( int state )
- {
--  Status  status = RRSetConfigFailed;
-+  int i;
-+  XF86VidModeModeLine mode;
+ echo "SQLITE database (--enable-sqlite)        = $with_sqlite (profiles depend on this)"
  
--  if(data==NULL)
-+  if (properties->noxf86vm)
-     return;
+--- gcompris-7.4/config.h.in.xf86vm	2006-04-12 01:16:12.000000000 +0200
++++ gcompris-7.4/config.h.in	2006-05-13 14:16:46.000000000 +0200
+@@ -141,5 +141,5 @@
+ /* Version number of package */
+ #undef VERSION
  
--  if (data->xr_lock_updates) return;
--  
--  status = XRRSetScreenConfig (GDK_DISPLAY(), 
--			       data->xr_screen_conf, 
--			       GDK_ROOT_WINDOW(), 
--			       data->xr_current_size, 
--			       data->xr_current_rotation, 
--			       CurrentTime);
--
--  if(status) {
--    g_error("ERROR: Failed to set back the original resolution XRRSetScreenConfig returned status = %d\n",
--	    (int)status);
--  }
--  return;
--
-+  if (state)
-+    {
-+      XF86VidModeModeInfo **modes;
-+      int mode_count;
-+      gint x,y;
-+      
-+      if (!XF86VidModeGetModeLine(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
-+            gdk_screen_get_default()), &i, &mode))
-+        {
-+          /* If we can't get the currentmode force setting of a new mode. */
-+          mode.hdisplay = 0;
-+        }
-+        
-+      /* Do we need to switch? */
-+      if ((mode.hdisplay != BOARDWIDTH) ||
-+          (mode.vdisplay != BOARDHEIGHT+BARHEIGHT))
-+        {
-+          if (!XF86VidModeGetAllModeLines(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
-+                gdk_screen_get_default()), &mode_count, &modes))
-+            mode_count = 0;
-+
-+          for (i = 0; i < mode_count; i++)
-+            {
-+              if ((modes[i]->hdisplay == BOARDWIDTH) &&
-+                  (modes[i]->vdisplay == BOARDHEIGHT+BARHEIGHT))
-+                {
-+                  if (XF86VidModeSwitchToMode(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
-+                        gdk_screen_get_default()), modes[i]))
-+                    {
-+                      XF86VidModeData.width  = modes[i]->hdisplay;
-+                      XF86VidModeData.height = modes[i]->vdisplay;
-+                    }
-+                  else
-+                      g_warning("XF86VidMode couldnot switch resolution");
-+                  break;
-+                }
-+            }
-+          if (i == mode_count)
-+            g_warning("XF86VidMode couldnot find a suitable resolution");
-+          if (mode_count)
-+            XFree(modes);
-+        }
-+        /* We need to grab the pointer before setting the viewport otherwise
-+           setviewport may get "canceled" by the pointer being outside the
-+           current viewport. */
-+        if (gdk_pointer_grab(window->window, TRUE, 0, window->window, NULL,
-+              GDK_CURRENT_TIME) != GDK_GRAB_SUCCESS)
-+          g_warning("Pointer grab failed");
-+           
-+        gdk_window_get_position(window->window, &x, &y);
-+        if (!XF86VidModeSetViewPort(GDK_DISPLAY(),
-+              GDK_SCREEN_XNUMBER(gdk_screen_get_default()), x, y))
-+          g_warning("XF86VidMode couldnot change viewport");
-+    }
-+  else
-+    {
-+      if (!XF86VidModeGetModeLine(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
-+            gdk_screen_get_default()), &i, &mode) ||
-+          (mode.hdisplay != XF86VidModeData.orig_mode.hdisplay) ||
-+          (mode.vdisplay != XF86VidModeData.orig_mode.vdisplay))
-+        {
-+          if (XF86VidModeSwitchToMode(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
-+                gdk_screen_get_default()), &XF86VidModeData.orig_mode))
-+            {
-+              XF86VidModeData.width  = XF86VidModeData.orig_mode.hdisplay;
-+              XF86VidModeData.height = XF86VidModeData.orig_mode.vdisplay;
-+            }
-+          else
-+              g_warning("XF86VidMode couldnot restore original resolution");
-+            
-+        }
-+      gdk_pointer_ungrab(GDK_CURRENT_TIME);
-+      if (XF86VidModeData.orig_viewport_x || XF86VidModeData.orig_viewport_y)
-+        if (!XF86VidModeSetViewPort(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
-+              gdk_screen_get_default()), XF86VidModeData.orig_viewport_x,
-+              XF86VidModeData.orig_viewport_y))
-+          g_warning("XF86VidMode couldnot restore original viewport");
-+    }
- }
- #endif
- 
-@@ -1185,9 +1233,9 @@
-       properties->fullscreen = TRUE;
-     }
- 
--  if (popt_noxrandr)
-+  if (popt_noxf86vm)
-     {
--      properties->noxrandr = TRUE;
-+      properties->noxf86vm = TRUE;
-     }
- 
-   if (popt_window)
---- gcompris-7.4/src/gcompris/properties.c.xf86vm	2006-05-11 09:42:17.000000000 +0200
-+++ gcompris-7.4/src/gcompris/properties.c	2006-05-11 09:42:18.000000000 +0200
-@@ -160,7 +160,7 @@
-   tmp->fx		 = 1;
-   tmp->screensize	 = 1;
-   tmp->fullscreen	 = 1;
--  tmp->noxrandr		 = FALSE;
-+  tmp->noxf86vm		 = FALSE;
-   tmp->timer		 = 1;
-   tmp->skin		 = "babytoy";
-   tmp->key		 = "default";
-@@ -244,8 +244,8 @@
- 	} else if(!strcmp(value.v_identifier, "fullscreen")) {
- 	  if(!scan_get_int(scanner, &tmp->fullscreen))
- 	    g_warning("Config file parsing error on token %s", token);
--	} else if(!strcmp(value.v_identifier, "noxrandr")) {
--	  if(!scan_get_int(scanner, &tmp->noxrandr))
-+	} else if(!strcmp(value.v_identifier, "noxf86vm")) {
-+	  if(!scan_get_int(scanner, &tmp->noxf86vm))
- 	    g_warning("Config file parsing error on token %s", token);
- 	} else if(!strcmp(value.v_identifier, "timer")) {
- 	  if(!scan_get_int(scanner, &tmp->timer))
---- gcompris-7.4/src/gcompris/properties.h.xf86vm	2006-05-11 09:42:17.000000000 +0200
-+++ gcompris-7.4/src/gcompris/properties.h	2006-05-11 09:42:18.000000000 +0200
-@@ -28,7 +28,7 @@
-   gint		music;
-   gint		fx;
-   gint		fullscreen;
--  gint		noxrandr;
-+  gint		noxf86vm;
-   gint		screensize;
-   gint		defaultcursor;
-   gint		timer;
---- gcompris-7.4/src/gcompris/board_config.c.xf86vm	2006-05-11 09:42:17.000000000 +0200
-+++ gcompris-7.4/src/gcompris/board_config.c	2006-05-11 12:04:27.000000000 +0200
-@@ -125,6 +125,34 @@
- 
- }
- 
-+#ifdef XF86_VIDMODE
-+static GdkEventConfigure gcompris_last_configure_event;
-+
-+static gint gcompris_conf_window_configured(GtkWindow *window,
-+  GdkEventConfigure *event, gpointer param)
-+{
-+  gint new_x, new_y;
-+  double screen_width, screen_height;
-+  /* Because we call gtk_window_move, we cause a configure event. Filter out
-+     identical events to avoid looping. */
-+  if (memcmp(&gcompris_last_configure_event, event, sizeof(GdkEventConfigure)))
-+  {
-+    gnome_canvas_get_scroll_region( GNOME_CANVAS( gtk_bin_get_child( GTK_BIN(
-+      gcompris_get_window()))), NULL, NULL, &screen_width, &screen_height);
-+    /* strange but gcompris.c sets the scrollheight to screen_height + 30 */
-+    screen_height -= 30;
-+    new_x = ((gint)screen_width - event->width) / 2;
-+    new_y = ((gint)screen_height - event->height) / 2;
-+    /* printf("screen %dx%d, window %dx%d, place %dx%d\n", (int)screen_width, (int)screen_height, event->width, event->height, new_x, new_y); */
-+    gtk_window_move (conf_window, new_x, new_y);
-+    memcpy(&gcompris_last_configure_event, event, sizeof(GdkEventConfigure));
-+  }
-+
-+  /* Act as if we aren't there / aren't hooked up */
-+  return FALSE;
-+}
-+#endif
-+
- GtkVBox *gcompris_configuration_window(gchar *label, GcomprisConfCallback callback)
- {
-   GtkWidget *header;
-@@ -145,7 +173,18 @@
-   
- 
-   /* parameters */
--  gtk_window_set_position         (conf_window,
-+#ifdef XF86_VIDMODE
-+  if (gcompris_get_properties()->fullscreen &&
-+      !gcompris_get_properties()->noxf86vm)   
-+    {
-+      memset(&gcompris_last_configure_event, 0, sizeof(GdkEventConfigure));
-+      gtk_widget_add_events(GTK_WIDGET(conf_window), GDK_STRUCTURE_MASK);
-+      gtk_signal_connect (GTK_OBJECT (conf_window), "configure_event",
-+        GTK_SIGNAL_FUNC (gcompris_conf_window_configured), 0);
-+    }
-+  else
-+#endif
-+      gtk_window_set_position (conf_window,
- 				   GTK_WIN_POS_CENTER_ALWAYS);
- 
-   gtk_widget_show(GTK_WIDGET(conf_window));
---- gcompris-7.4/src/boards/python/tuxpaint.py.xf86vm	2006-01-22 23:20:06.000000000 +0100
-+++ gcompris-7.4/src/boards/python/tuxpaint.py	2006-05-11 09:42:22.000000000 +0200
-@@ -103,6 +103,11 @@
-       options.append('--nostampcontrols')
-   
-     gcompris.sound.close()
-+    
-+    # release pointergrab if running fullscreen, tuxpaint wants to grab the
-+    # pointer itself
-+    if (Prop.fullscreen and not Prop.noxf86vm):
-+      gtk.gdk.pointer_ungrab()
- 
-     #self.window.set_property("accept-focus", 0)
-     #self.window.set_keep_below(False)
-@@ -115,7 +120,7 @@
-       gcompris.utils.dialog(_("Cannot find Tuxpaint.\nInstall it to use this activity !"),stop_board)
-       return 
-     
--    gcompris.child_watch_add(pid, child_callback, None)
-+    gcompris.child_watch_add(pid, child_callback, self)
- 
-     gcompris.bar_set(0)
-     gcompris.bar_hide(1)
-@@ -221,6 +226,10 @@
-     return default_config_dict
- 
- def child_callback(fd,  cond, data):
-+  # restore pointergrab if running fullscreen
-+  if (gcompris.get_properties().fullscreen and
-+      not gcompris.get_properties().noxf86vm):
-+    gtk.gdk.pointer_grab(data.window.window, True, 0, data.window.window)
-   #global board
-   #board.window.set_property("accept-focus", 1)
-   #board.window.set_keep_above(False)
---- gcompris-7.4/src/boards/py-gcompris-properties.c.xf86vm	2006-05-11 09:42:17.000000000 +0200
-+++ gcompris-7.4/src/boards/py-gcompris-properties.c	2006-05-11 09:42:18.000000000 +0200
+-/* XRANDR Available */
+-#undef XRANDR
++/* XF86VidMode Available */
++#undef XF86_VIDMODE
+--- gcompris-7.4/src/boards/py-gcompris-properties.c.xf86vm	2006-05-13 14:16:46.000000000 +0200
++++ gcompris-7.4/src/boards/py-gcompris-properties.c	2006-05-13 14:16:46.000000000 +0200
 @@ -72,8 +72,8 @@
  	return Py_False;
        }
@@ -557,7 +224,7 @@
  	return Py_True;
        } else {
 --- gcompris-7.4/src/boards/draw.c.xf86vm	2006-04-04 00:00:43.000000000 +0200
-+++ gcompris-7.4/src/boards/draw.c	2006-05-11 09:42:18.000000000 +0200
++++ gcompris-7.4/src/boards/draw.c	2006-05-13 14:16:46.000000000 +0200
 @@ -2008,7 +2008,7 @@
  	case 1:
  	  fleur = gdk_cursor_new(get_resize_cursor(anchor));
@@ -595,7 +262,7 @@
  	  draggingItem = NULL;
  
 --- gcompris-7.4/src/boards/hanoi_real.c.xf86vm	2006-01-22 22:49:31.000000000 +0100
-+++ gcompris-7.4/src/boards/hanoi_real.c	2006-05-11 09:42:18.000000000 +0200
++++ gcompris-7.4/src/boards/hanoi_real.c	2006-05-13 14:16:46.000000000 +0200
 @@ -472,7 +472,7 @@
  	  gnome_canvas_item_raise_to_top(data->item);
  	  
@@ -615,7 +282,7 @@
  	  
  	  /* Search the column (x) where this item is ungrabbed */
 --- gcompris-7.4/src/boards/clockgame.c.xf86vm	2006-04-05 01:16:11.000000000 +0200
-+++ gcompris-7.4/src/boards/clockgame.c	2006-05-11 09:42:18.000000000 +0200
++++ gcompris-7.4/src/boards/clockgame.c	2006-05-13 14:16:46.000000000 +0200
 @@ -663,7 +663,7 @@
        y = item_y;
  
@@ -635,7 +302,7 @@
  	}
        break;
 --- gcompris-7.4/src/boards/hanoi.c.xf86vm	2005-11-18 23:48:28.000000000 +0100
-+++ gcompris-7.4/src/boards/hanoi.c	2006-05-11 09:42:18.000000000 +0200
++++ gcompris-7.4/src/boards/hanoi.c	2006-05-13 14:16:46.000000000 +0200
 @@ -645,7 +645,7 @@
  	  gnome_canvas_item_raise_to_top(data->item_text);
  	  
@@ -655,7 +322,7 @@
  	  
  	  /* Search the column (x) where this item is ungrabbed */
 --- gcompris-7.4/src/boards/chess.c.xf86vm	2006-04-03 23:59:47.000000000 +0200
-+++ gcompris-7.4/src/boards/chess.c	2006-05-11 09:42:18.000000000 +0200
++++ gcompris-7.4/src/boards/chess.c	2006-05-13 14:16:46.000000000 +0200
 @@ -839,7 +839,7 @@
  	
  	fleur = gdk_cursor_new(GDK_FLEUR);
@@ -675,7 +342,7 @@
  
  	   position_display(position);
 --- gcompris-7.4/src/boards/shapegame.c.xf86vm	2006-04-04 00:05:12.000000000 +0200
-+++ gcompris-7.4/src/boards/shapegame.c	2006-05-11 09:42:18.000000000 +0200
++++ gcompris-7.4/src/boards/shapegame.c	2006-05-13 14:16:46.000000000 +0200
 @@ -1103,7 +1103,7 @@
  	       gnome_canvas_item_raise_to_top(shape_list_root_item);
  	       gnome_canvas_item_raise_to_top(item);
@@ -713,7 +380,7 @@
  	   dragging = FALSE;
  
 --- gcompris-7.4/src/boards/planegame.c.xf86vm	2005-10-15 16:54:30.000000000 +0200
-+++ gcompris-7.4/src/boards/planegame.c	2006-05-11 09:42:18.000000000 +0200
++++ gcompris-7.4/src/boards/planegame.c	2006-05-13 14:16:46.000000000 +0200
 @@ -578,7 +578,7 @@
                 y = item_y;
                 
@@ -733,7 +400,7 @@
  	 }
         break;
 --- gcompris-7.4/src/boards/enumerate.c.xf86vm	2005-11-18 23:48:12.000000000 +0100
-+++ gcompris-7.4/src/boards/enumerate.c	2006-05-11 09:42:18.000000000 +0200
++++ gcompris-7.4/src/boards/enumerate.c	2006-05-13 14:16:46.000000000 +0200
 @@ -522,7 +522,7 @@
  	   gnome_canvas_item_raise_to_top(item);
  
@@ -753,7 +420,7 @@
  	 }
         break;
 --- gcompris-7.4/src/boards/clickgame.c.xf86vm	2005-10-10 00:21:56.000000000 +0200
-+++ gcompris-7.4/src/boards/clickgame.c	2006-05-11 09:42:18.000000000 +0200
++++ gcompris-7.4/src/boards/clickgame.c	2006-05-13 14:16:46.000000000 +0200
 @@ -598,7 +598,7 @@
                 y = item_y;
                 
@@ -773,7 +440,7 @@
  	 }
         break;
 --- gcompris-7.4/src/boards/traffic.c.xf86vm	2006-04-04 00:06:09.000000000 +0200
-+++ gcompris-7.4/src/boards/traffic.c	2006-05-11 09:42:18.000000000 +0200
++++ gcompris-7.4/src/boards/traffic.c	2006-05-13 14:16:46.000000000 +0200
 @@ -417,7 +417,7 @@
        cursor=gdk_cursor_new(GDK_SB_V_DOUBLE_ARROW);
      else 
@@ -801,220 +468,579 @@
  	hit=0;
  	moving=FALSE;
        }
---- gcompris-7.4/configure.xf86vm	2006-04-12 01:13:49.000000000 +0200
-+++ gcompris-7.4/configure	2006-05-11 09:42:18.000000000 +0200
-@@ -1094,7 +1094,7 @@
-   --disable-sdltest       Do not try to compile and run a test SDL program
-   --disable-glibtest      do not try to compile and run a test GLIB program
-   --disable-rpath         do not hardcode runtime library paths
--  --disable-xrandr        Turn off xrandr
-+  --disable-xf86vidmode   Turn off xf86vidmode
-   --enable-debug          Turn on debugging messages
-   --disable-sqlite        Turn off sqlite (will disable profile)
-   --enable-py-build-only  Skip python modules tests. (Useful if you just need
-@@ -23630,7 +23630,7 @@
- /usr/openwin/share/include'
+--- gcompris-7.4/src/boards/python/tuxpaint.py.xf86vm	2006-01-22 23:20:06.000000000 +0100
++++ gcompris-7.4/src/boards/python/tuxpaint.py	2006-05-13 14:16:46.000000000 +0200
+@@ -17,7 +17,7 @@
+ #   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ # 
+ import gnome
+-import gnome.canvas
++import gnomecanvas
+ import gcompris
+ import gcompris.utils
+ import gcompris.bonus
+@@ -69,7 +69,7 @@
+     self.config_dict.update(gcompris.get_board_conf())
+     
+     self.rootitem = self.gcomprisBoard.canvas.root().add(
+-      gnome.canvas.CanvasGroup,
++      gnomecanvas.CanvasGroup,
+       x=0.0,
+       y=0.0
+       )
+@@ -103,6 +103,11 @@
+       options.append('--nostampcontrols')
+   
+     gcompris.sound.close()
++    
++    # release pointergrab if running fullscreen, tuxpaint wants to grab the
++    # pointer itself
++    if (Prop.fullscreen and not Prop.noxf86vm):
++      gtk.gdk.pointer_ungrab()
  
- if test "$ac_x_includes" = no; then
--  # Guess where to find include files, by looking for Intrinsic.h.
-+  # Guess where to find include files, by looking for Xlib.h.
-   # First, try using that file with no special directory specified.
-   cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
-@@ -23638,7 +23638,7 @@
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
--#include <X11/Intrinsic.h>
-+#include <X11/Xlib.h>
- _ACEOF
- if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-@@ -23665,7 +23665,7 @@
- sed 's/^/| /' conftest.$ac_ext >&5
+     #self.window.set_property("accept-focus", 0)
+     #self.window.set_keep_below(False)
+@@ -115,7 +120,7 @@
+       gcompris.utils.dialog(_("Cannot find Tuxpaint.\nInstall it to use this activity !"),stop_board)
+       return 
+     
+-    gcompris.child_watch_add(pid, child_callback, None)
++    gcompris.child_watch_add(pid, child_callback, self)
  
-   for ac_dir in $ac_x_header_dirs; do
--  if test -r "$ac_dir/X11/Intrinsic.h"; then
-+  if test -r "$ac_dir/X11/Xlib.h"; then
-     ac_x_includes=$ac_dir
-     break
-   fi
-@@ -23686,11 +23686,11 @@
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
--#include <X11/Intrinsic.h>
-+#include <X11/Xlib.h>
- int
- main ()
- {
--XtMalloc (0)
-+XrmInitialize ()
-   ;
-   return 0;
- }
-@@ -23769,23 +23769,23 @@
- echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
- fi
+     gcompris.bar_set(0)
+     gcompris.bar_hide(1)
+@@ -124,7 +129,7 @@
+                             gcompris.skin.image_to_skin("gcompris-bg.jpg"))
  
--# Check whether --enable-xrandr or --disable-xrandr was given.
--if test "${enable_xrandr+set}" = set; then
--  enableval="$enable_xrandr"
--  USE_XRANDR="$enableval"
-+# Check whether --enable-xf86vidmode or --disable-xf86vidmode was given.
-+if test "${enable_xf86vidmode+set}" = set; then
-+  enableval="$enable_xf86vidmode"
-+  USE_XF86VM="$enableval"
- else
--  USE_XRANDR="yes"
-+  USE_XF86VM="yes"
- fi;
--found_randr=no
--if test "x$USE_XRANDR" == "xyes" ; then
--  RANDR_LIBS=
--  echo "$as_me:$LINENO: checking for XRRSetScreenConfigAndRate in -lXrandr" >&5
--echo $ECHO_N "checking for XRRSetScreenConfigAndRate in -lXrandr... $ECHO_C" >&6
--if test "${ac_cv_lib_Xrandr_XRRSetScreenConfigAndRate+set}" = set; then
-+found_xf86vidmode=no
-+if test "x$USE_XF86VM" == "xyes" ; then
-+  XF86VM_LIBS=
-+  echo "$as_me:$LINENO: checking for XF86VidModeQueryExtension in -lXxf86vm" >&5
-+echo $ECHO_N "checking for XF86VidModeQueryExtension in -lXxf86vm... $ECHO_C" >&6
-+if test "${ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
--LIBS="-lXrandr -L$x_libraries $ALL_X_LIBS  $LIBS"
-+LIBS="-lXxf86vm -L$x_libraries $ALL_X_LIBS  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
-@@ -23799,11 +23799,11 @@
+     textItem = self.rootitem.add(
+-      gnome.canvas.CanvasText,
++      gnomecanvas.CanvasText,
+       text = _("Waiting for Tuxpaint to finish"), 
+       x = gcompris.BOARD_WIDTH/2, 
+       y = 185,
+@@ -221,6 +226,10 @@
+     return default_config_dict
+ 
+ def child_callback(fd,  cond, data):
++  # restore pointergrab if running fullscreen
++  if (gcompris.get_properties().fullscreen and
++      not gcompris.get_properties().noxf86vm):
++    gtk.gdk.pointer_grab(data.window.window, True, 0, data.window.window)
+   #global board
+   #board.window.set_property("accept-focus", 1)
+   #board.window.set_keep_above(False)
+--- gcompris-7.4/src/gcompris/gcompris.h.xf86vm	2006-03-02 00:02:09.000000000 +0100
++++ gcompris-7.4/src/gcompris/gcompris.h	2006-05-13 14:16:46.000000000 +0200
+@@ -159,6 +159,12 @@
+ 
+ void gcompris_confirm_stop (void);
+ 
++/* Use these instead of the gnome_canvas ones for proper fullscreen mousegrab
++   handling. */
++int gcompris_canvas_item_grab (GnomeCanvasItem *item, unsigned int event_mask,
++			    GdkCursor *cursor, guint32 etime);
++void gcompris_canvas_item_ungrab (GnomeCanvasItem *item, guint32 etime);
++
+ /* Trace Log */
+ #define GCOMPRIS_LOG_STATUS_PASSED    "PASSED"
+ #define GCOMPRIS_LOG_STATUS_FAILED    "FAILED"
+--- gcompris-7.4/src/gcompris/gcompris.c.xf86vm	2006-03-02 00:47:10.000000000 +0100
++++ gcompris-7.4/src/gcompris/gcompris.c	2006-05-13 14:20:00.000000000 +0200
+@@ -33,12 +33,12 @@
+ 
+ #include "cursor.h"
+ 
+-/* For XRANDR Support */
+-#ifdef XRANDR
++/* For XF86_VIDMODE Support */
++#ifdef XF86_VIDMODE
+ #include <gdk/gdkx.h>
+ #include <X11/Xlib.h>
+-#include <X11/extensions/Xrandr.h>
+-#include <X11/extensions/Xrender.h>
++#include <X11/Xutil.h>
++#include <X11/extensions/xf86vmode.h>   
  #endif
- /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
--char XRRSetScreenConfigAndRate ();
-+char XF86VidModeQueryExtension ();
- int
- main ()
+ 
+ #if defined _WIN32 || defined __WIN32__
+@@ -104,7 +104,7 @@
+ static int popt_aalias		   = FALSE;
+ static int popt_difficulty_filter  = FALSE;
+ static int popt_debug		   = FALSE;
+-static int popt_noxrandr	   = FALSE;
++static int popt_noxf86vm	   = FALSE;
+ static char *popt_root_menu        = NULL;
+ static char *popt_local_activity   = NULL;
+ static int popt_administration	   = FALSE;
+@@ -139,8 +139,8 @@
+    N_("Print the version of " PACKAGE), NULL},
+   {"antialiased", '\0', POPT_ARG_NONE, &popt_aalias, 0,
+    N_("Use the antialiased canvas (slower)."), NULL},
+-  {"noxrandr", 'x', POPT_ARG_NONE, &popt_noxrandr, 0,
+-   N_("Disable XRANDR (No screen resolution change)."), NULL},
++  {"noxf86vm", 'x', POPT_ARG_NONE, &popt_noxf86vm, 0,
++   N_("Disable XF86VidMode (No screen resolution change)."), NULL},
+   {"root-menu", 'l', POPT_ARG_STRING, &popt_root_menu, 0,
+    N_("Run gcompris with local menu (e.g -l /reading will let you play only activities in the reading directory, -l /boards/connect4 only the connect4 activity)"), NULL},
+   {"local-activity", 'L', POPT_ARG_STRING, &popt_local_activity, 0,
+@@ -184,29 +184,19 @@
+ };
+ 
+ /* XRandr Stuff */
+-#ifdef XRANDR
+-typedef struct 
++#ifdef XF86_VIDMODE
++static struct 
  {
--XRRSetScreenConfigAndRate ();
-+XF86VidModeQueryExtension ();
-   ;
-   return 0;
- }
-@@ -23830,23 +23830,23 @@
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
--  ac_cv_lib_Xrandr_XRRSetScreenConfigAndRate=yes
-+  ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+-  gboolean                xr_lock_updates;
++  int vidmode_available;
++  XF86VidModeModeInfo orig_mode;
++  int orig_viewport_x;
++  int orig_viewport_y;
++  int width;
++  int height;
++} XF86VidModeData = { 0, { 0 }, 0, 0 };
  
--ac_cv_lib_Xrandr_XRRSetScreenConfigAndRate=no
-+ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension=no
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
- fi
--echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRSetScreenConfigAndRate" >&5
--echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRSetScreenConfigAndRate" >&6
--if test $ac_cv_lib_Xrandr_XRRSetScreenConfigAndRate = yes; then
--  echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
--echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6
--if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
-+echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension" >&5
-+echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension" >&6
-+if test $ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension = yes; then
-+  echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
-+echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
-+if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
-@@ -23857,7 +23857,7 @@
- /* end confdefs.h.  */
- #include <X11/Xlib.h>
+-  XRRScreenConfiguration *xr_screen_conf;
+-
+-  XRRScreenSize          *xr_sizes;
+-  int                     xr_nsize;
+-  SizeID	          xr_current_size;
+-
+-  Rotation                xr_rotations;
+-  Rotation                xr_current_rotation;
+-
+-} XRANDRData; 
+-
+-static SizeID		 xr_previous_size;
+-static gboolean		 xr_previous_size_set = FALSE;
+-static XRANDRData	*xrandr = NULL;
+-
+-static void xrandr_init ( XRANDRData *xrandr );
+-static void xrandr_get_config ( XRANDRData *xrandr );
+-static void xrandr_set_config( XRANDRData  *xrandr );
++static void xf86_vidmode_init( void );
++static void xf86_vidmode_set_fullscreen( int state );
+ #endif
  
--#include <X11/extensions/Xrandr.h>
-+#include <X11/extensions/xf86vmode.h>
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-@@ -23881,38 +23881,38 @@
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
--  ac_cv_header_X11_extensions_Xrandr_h=yes
-+  ac_cv_header_X11_extensions_xf86vmode_h=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+ /****************************************************************************/
+@@ -441,8 +431,8 @@
+   gint screen_height, screen_width;
+   GtkWidget *vbox;
  
--ac_cv_header_X11_extensions_Xrandr_h=no
-+ac_cv_header_X11_extensions_xf86vmode_h=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
--echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
--echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6
--if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
--  RANDR_LIBS="-L$x_libraries -lXrandr" found_randr=yes
-+echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
-+echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
-+if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
-+  XF86VM_LIBS="-L$x_libraries -lXxf86vm" found_xf86vidmode=yes
- fi
+-#ifdef XRANDR
+-  xrandr = g_new0 (XRANDRData, 1);
++#ifdef XF86_VIDMODE
++  xf86_vidmode_init();
+ #endif
  
+   gcompris_set_fullscreen(properties->fullscreen);
+@@ -450,10 +440,10 @@
+   screen_height = gdk_screen_height();
+   screen_width  = gdk_screen_width();
  
- fi
+-#ifdef XRANDR
+-  if(properties->fullscreen && !properties->noxrandr) {
+-    screen_height = xrandr->xr_sizes[xrandr->xr_current_size].height;
+-    screen_width  = xrandr->xr_sizes[xrandr->xr_current_size].width;
++#ifdef XF86_VIDMODE
++  if(properties->fullscreen && !properties->noxf86vm) {
++    screen_width  = XF86VidModeData.width;
++    screen_height = XF86VidModeData.height;
+   }
+ #endif
  
+@@ -811,39 +801,11 @@
+  */
+ void gcompris_set_fullscreen(gboolean state)
+ {
+-
++#ifdef XF86_VIDMODE
++  xf86_vidmode_set_fullscreen(state);
++#endif
+   if(state)
+     {
+-#ifdef XRANDR
+-      gint i;
+-      /* Search the 800x600 Resolution */
+-      if(properties->fullscreen && !properties->noxrandr) {
+-	
+-	g_warning("XRANDR Is compiled in. Searching a good resolution");
+-
+-	/* Check if XRANDR is available */
+-	if (!properties->noxrandr) {
+-	  xrandr_get_config ( xrandr );
+-	  xr_previous_size = (SizeID)xrandr->xr_current_size;
+-	  for (i = 0; i < xrandr->xr_nsize; i++) {
+-	    if(xrandr->xr_sizes[i].width == BOARDWIDTH &&
+-	       xrandr->xr_sizes[i].height == BOARDHEIGHT+BARHEIGHT) 
+-	      {
+-		xrandr->xr_current_size = (SizeID)i;
+-		xr_previous_size_set = TRUE;
+-		break;
+-	      }
+-	  }
+-	}
+-
+-	/* Set the Fullscreen now */
+-	if(xr_previous_size_set) 
+-	  {
+-	    if(is_mapped)
+-	      xrandr_set_config( xrandr );
+-	  }
+-      }
+-#endif
+       gdk_window_set_decorations (window->window, 0);
+       gdk_window_set_functions (window->window, 0);
+       gtk_widget_set_uposition (window, 0, 0);
+@@ -851,20 +813,6 @@
+     }
+   else
+     { 
+-#ifdef XRANDR
+-      /* Set back the original screen size */
+-      if(xr_previous_size_set && !properties->noxrandr)
+-	{
+-	  /* Need to refresh our config or xrandr api will reject us */
+-	  if(xrandr)
+-	    {
+-	      xrandr_get_config ( xrandr );
+-	      xrandr->xr_current_size = (SizeID)xr_previous_size;
+-	      xrandr_set_config( xrandr );
+-	    }
+-	}
+-      xr_previous_size_set = FALSE;
+-#endif
+       /* The hide must be done at least for KDE */
+       gtk_widget_hide (window);
+       gdk_window_set_decorations (window->window, GDK_DECOR_ALL);
+@@ -876,6 +824,42 @@
+ 
+ }
+ 
++/* Use these instead of the gnome_canvas ones for proper fullscreen mousegrab
++   handling. */
++int gcompris_canvas_item_grab (GnomeCanvasItem *item, unsigned int event_mask,
++			    GdkCursor *cursor, guint32 etime)
++{
++  int retval;
++  
++  retval = gnome_canvas_item_grab(item, event_mask, cursor, etime);
++  if (retval != GDK_GRAB_SUCCESS)
++    return retval;
++  
++#ifdef XF86_VIDMODE
++  /* When fullscreen override mouse grab with our own which
++     confines the cursor to our fullscreen window */
++  if (properties->fullscreen && !properties->noxf86vm)
++    if (gdk_pointer_grab(item->canvas->layout.bin_window, FALSE, event_mask,
++          window->window, cursor, etime+1) != GDK_GRAB_SUCCESS) 
++      g_warning("Pointer grab failed");
++#endif
++  
++  return retval;
++}
++
++void gcompris_canvas_item_ungrab (GnomeCanvasItem *item, guint32 etime)
++{
++  gnome_canvas_item_ungrab(item, etime);
++#ifdef XF86_VIDMODE
++  /* When fullscreen restore the normal mouse grab which avoids
++     scrolling the virtual desktop */
++  if (properties->fullscreen && !properties->noxf86vm)
++    if (gdk_pointer_grab(window->window, TRUE, 0, window->window, NULL,
++          etime+1) != GDK_GRAB_SUCCESS)
++      g_warning("Pointer grab failed");
++#endif
++}
++
+ void gcompris_exit()
+ {
+   /* Do not loopback in exit */
+@@ -1044,68 +1028,131 @@
+     g_printerr ("%s: %s\n\n", "gcompris", message);
+ }
+ 
+-#ifdef XRANDR
++#ifdef XF86_VIDMODE
+ /*
+- * XRANDR STUFF
+- * ------------
++ * XF86VidMode STUFF
++ * -----------------
+  */
+ static void
+-xrandr_init ( XRANDRData *data )
++xf86_vidmode_init ( void )
+ {
+-  if(data==NULL)
++  int i,j;
++  XF86VidModeModeLine *l = (XF86VidModeModeLine *)((char *)
++    &XF86VidModeData.orig_mode + sizeof XF86VidModeData.orig_mode.dotclock);
++  
++  if (properties->noxf86vm)
+     return;
+-
+-  data->xr_screen_conf = XRRGetScreenInfo (GDK_DISPLAY(), GDK_ROOT_WINDOW());
+-
+-  if (data->xr_screen_conf == NULL)
++  
++  if (!XF86VidModeQueryVersion(GDK_DISPLAY(), &i, &j))
++    properties->noxf86vm = TRUE;
++  else if (!XF86VidModeQueryExtension(GDK_DISPLAY(), &i, &j))
++    properties->noxf86vm = TRUE;
++  else if (!XF86VidModeGetModeLine(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
++            gdk_screen_get_default()), &XF86VidModeData.orig_mode.dotclock, l))
++    properties->noxf86vm = TRUE;
++  else if (!XF86VidModeGetViewPort(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
++            gdk_screen_get_default()), &XF86VidModeData.orig_viewport_x,
++            &XF86VidModeData.orig_viewport_y))
++    properties->noxf86vm = TRUE;
++  
++  if (properties->noxf86vm)
++      g_warning("XF86VidMode not available");
++  else
+     {
+-      g_warning("XRANDR not available");
+-      properties->noxrandr = TRUE;
++      XF86VidModeData.width  = XF86VidModeData.orig_mode.hdisplay;
++      XF86VidModeData.height = XF86VidModeData.orig_mode.vdisplay;
++      g_warning("XF86VidMode support enabled");
+     }
+-  else
+-      g_warning("XRANDR support enabled");
+- }
+-
+-static void
+-xrandr_get_config ( XRANDRData *data )
+-{
+-  if(data==NULL)
+-    return;
+-
+-  xrandr_init (data);
+-
+-  data->xr_current_size = XRRConfigCurrentConfiguration (data->xr_screen_conf, 
+-							 &data->xr_current_rotation);
+-
+-  data->xr_sizes = XRRConfigSizes(data->xr_screen_conf, &data->xr_nsize);
+-  
+-  data->xr_rotations = XRRConfigRotations(data->xr_screen_conf,
+-					  &data->xr_current_rotation);
+ }
  
--  if test "x$found_randr" = "xno"; then
--     { echo "$as_me:$LINENO: \"Suitable Xrandr extension library not found - you need at least X 4.3. Will not use xrandr for fullscreen.\"" >&5
--echo "$as_me: \"Suitable Xrandr extension library not found - you need at least X 4.3. Will not use xrandr for fullscreen.\"" >&6;}
-+  if test "x$found_xf86vidmode" = "xno"; then
-+     { echo "$as_me:$LINENO: \"Suitable XF86VidMode extension library not found - Will not use xf86vidmode for fullscreen.\"" >&5
-+echo "$as_me: \"Suitable XF86VidMode extension library not found - Will not use xf86vidmode for fullscreen.\"" >&6;}
-   else
++
+ static void
+-xrandr_set_config( XRANDRData  *data )
++xf86_vidmode_set_fullscreen ( int state )
+ {
+-  Status  status = RRSetConfigFailed;
++  int i;
++  XF86VidModeModeLine mode;
  
- cat >>confdefs.h <<_ACEOF
--#define XRANDR 1
-+#define XF86_VIDMODE 1
- _ACEOF
+-  if(data==NULL)
++  if (properties->noxf86vm)
+     return;
  
-   fi
- fi
+-  if (data->xr_lock_updates) return;
+-  
+-  status = XRRSetScreenConfig (GDK_DISPLAY(), 
+-			       data->xr_screen_conf, 
+-			       GDK_ROOT_WINDOW(), 
+-			       data->xr_current_size, 
+-			       data->xr_current_rotation, 
+-			       CurrentTime);
+-
+-  if(status) {
+-    g_error("ERROR: Failed to set back the original resolution XRRSetScreenConfig returned status = %d\n",
+-	    (int)status);
+-  }
+-  return;
+-
++  if (state)
++    {
++      XF86VidModeModeInfo **modes;
++      int mode_count;
++      gint x,y;
++      
++      if (!XF86VidModeGetModeLine(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
++            gdk_screen_get_default()), &i, &mode))
++        {
++          /* If we can't get the currentmode force setting of a new mode. */
++          mode.hdisplay = 0;
++        }
++        
++      /* Do we need to switch? */
++      if ((mode.hdisplay != BOARDWIDTH) ||
++          (mode.vdisplay != BOARDHEIGHT+BARHEIGHT))
++        {
++          if (!XF86VidModeGetAllModeLines(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
++                gdk_screen_get_default()), &mode_count, &modes))
++            mode_count = 0;
++
++          for (i = 0; i < mode_count; i++)
++            {
++              if ((modes[i]->hdisplay == BOARDWIDTH) &&
++                  (modes[i]->vdisplay == BOARDHEIGHT+BARHEIGHT))
++                {
++                  if (XF86VidModeSwitchToMode(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
++                        gdk_screen_get_default()), modes[i]))
++                    {
++                      XF86VidModeData.width  = modes[i]->hdisplay;
++                      XF86VidModeData.height = modes[i]->vdisplay;
++                    }
++                  else
++                      g_warning("XF86VidMode couldnot switch resolution");
++                  break;
++                }
++            }
++          if (i == mode_count)
++            g_warning("XF86VidMode couldnot find a suitable resolution");
++          if (mode_count)
++            XFree(modes);
++        }
++        /* We need to grab the pointer before setting the viewport otherwise
++           setviewport may get "canceled" by the pointer being outside the
++           current viewport. */
++        if (gdk_pointer_grab(window->window, TRUE, 0, window->window, NULL,
++              GDK_CURRENT_TIME) != GDK_GRAB_SUCCESS)
++          g_warning("Pointer grab failed");
++           
++        gdk_window_get_position(window->window, &x, &y);
++        if (!XF86VidModeSetViewPort(GDK_DISPLAY(),
++              GDK_SCREEN_XNUMBER(gdk_screen_get_default()), x, y))
++          g_warning("XF86VidMode couldnot change viewport");
++    }
++  else
++    {
++      if (!XF86VidModeGetModeLine(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
++            gdk_screen_get_default()), &i, &mode) ||
++          (mode.hdisplay != XF86VidModeData.orig_mode.hdisplay) ||
++          (mode.vdisplay != XF86VidModeData.orig_mode.vdisplay))
++        {
++          if (XF86VidModeSwitchToMode(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
++                gdk_screen_get_default()), &XF86VidModeData.orig_mode))
++            {
++              XF86VidModeData.width  = XF86VidModeData.orig_mode.hdisplay;
++              XF86VidModeData.height = XF86VidModeData.orig_mode.vdisplay;
++            }
++          else
++              g_warning("XF86VidMode couldnot restore original resolution");
++            
++        }
++      gdk_pointer_ungrab(GDK_CURRENT_TIME);
++      if (XF86VidModeData.orig_viewport_x || XF86VidModeData.orig_viewport_y)
++        if (!XF86VidModeSetViewPort(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
++              gdk_screen_get_default()), XF86VidModeData.orig_viewport_x,
++              XF86VidModeData.orig_viewport_y))
++          g_warning("XF86VidMode couldnot restore original viewport");
++    }
+ }
+ #endif
  
--LDFLAGS="${LDFLAGS} ${RANDR_LIBS}"
-+LDFLAGS="${LDFLAGS} ${XF86VM_LIBS}"
+@@ -1185,9 +1232,9 @@
+       properties->fullscreen = TRUE;
+     }
  
- ALL_LINGUAS="am ar az bg ca cs da de el en_CA en_GB es et eu fi fr ga gu he hi hr hu it ka lt mk ml ms nb ne nl nn pa pl pt pt_BR ro ru rw sk sl sq sr sr at Latn sv tr vi wa zh_CN zh_TW"
+-  if (popt_noxrandr)
++  if (popt_noxf86vm)
+     {
+-      properties->noxrandr = TRUE;
++      properties->noxf86vm = TRUE;
+     }
  
-@@ -28651,7 +28651,7 @@
- echo "SDL LIBS                                 = found"
- fi
+   if (popt_window)
+--- gcompris-7.4/src/gcompris/properties.c.xf86vm	2006-05-13 14:16:46.000000000 +0200
++++ gcompris-7.4/src/gcompris/properties.c	2006-05-13 14:16:46.000000000 +0200
+@@ -160,7 +160,7 @@
+   tmp->fx		 = 1;
+   tmp->screensize	 = 1;
+   tmp->fullscreen	 = 1;
+-  tmp->noxrandr		 = FALSE;
++  tmp->noxf86vm		 = FALSE;
+   tmp->timer		 = 1;
+   tmp->skin		 = "babytoy";
+   tmp->key		 = "default";
+@@ -244,8 +244,8 @@
+ 	} else if(!strcmp(value.v_identifier, "fullscreen")) {
+ 	  if(!scan_get_int(scanner, &tmp->fullscreen))
+ 	    g_warning("Config file parsing error on token %s", token);
+-	} else if(!strcmp(value.v_identifier, "noxrandr")) {
+-	  if(!scan_get_int(scanner, &tmp->noxrandr))
++	} else if(!strcmp(value.v_identifier, "noxf86vm")) {
++	  if(!scan_get_int(scanner, &tmp->noxf86vm))
+ 	    g_warning("Config file parsing error on token %s", token);
+ 	} else if(!strcmp(value.v_identifier, "timer")) {
+ 	  if(!scan_get_int(scanner, &tmp->timer))
+--- gcompris-7.4/src/gcompris/properties.h.xf86vm	2006-05-13 14:16:46.000000000 +0200
++++ gcompris-7.4/src/gcompris/properties.h	2006-05-13 14:16:46.000000000 +0200
+@@ -28,7 +28,7 @@
+   gint		music;
+   gint		fx;
+   gint		fullscreen;
+-  gint		noxrandr;
++  gint		noxf86vm;
+   gint		screensize;
+   gint		defaultcursor;
+   gint		timer;
+--- gcompris-7.4/src/gcompris/board_config.c.xf86vm	2006-05-13 14:16:46.000000000 +0200
++++ gcompris-7.4/src/gcompris/board_config.c	2006-05-13 14:16:46.000000000 +0200
+@@ -125,6 +125,34 @@
  
--echo "XRANDR option  (--enable-xrandr)         = $found_randr"
-+echo "XF86VM option  (--enable-xf86vidmode)    = $found_xf86vidmode"
+ }
  
- echo "SQLITE database (--enable-sqlite)        = $with_sqlite (profiles depend on this)"
++#ifdef XF86_VIDMODE
++static GdkEventConfigure gcompris_last_configure_event;
++
++static gint gcompris_conf_window_configured(GtkWindow *window,
++  GdkEventConfigure *event, gpointer param)
++{
++  gint new_x, new_y;
++  double screen_width, screen_height;
++  /* Because we call gtk_window_move, we cause a configure event. Filter out
++     identical events to avoid looping. */
++  if (memcmp(&gcompris_last_configure_event, event, sizeof(GdkEventConfigure)))
++  {
++    gnome_canvas_get_scroll_region( GNOME_CANVAS( gtk_bin_get_child( GTK_BIN(
++      gcompris_get_window()))), NULL, NULL, &screen_width, &screen_height);
++    /* strange but gcompris.c sets the scrollheight to screen_height + 30 */
++    screen_height -= 30;
++    new_x = ((gint)screen_width - event->width) / 2;
++    new_y = ((gint)screen_height - event->height) / 2;
++    /* printf("screen %dx%d, window %dx%d, place %dx%d\n", (int)screen_width, (int)screen_height, event->width, event->height, new_x, new_y); */
++    gtk_window_move (conf_window, new_x, new_y);
++    memcpy(&gcompris_last_configure_event, event, sizeof(GdkEventConfigure));
++  }
++
++  /* Act as if we aren't there / aren't hooked up */
++  return FALSE;
++}
++#endif
++
+ GtkVBox *gcompris_configuration_window(gchar *label, GcomprisConfCallback callback)
+ {
+   GtkWidget *header;
+@@ -145,7 +173,18 @@
+   
  
---- gcompris-7.4/config.h.in.xf86vm	2006-04-12 01:16:12.000000000 +0200
-+++ gcompris-7.4/config.h.in	2006-05-11 09:42:18.000000000 +0200
-@@ -141,5 +141,5 @@
- /* Version number of package */
- #undef VERSION
+   /* parameters */
+-  gtk_window_set_position         (conf_window,
++#ifdef XF86_VIDMODE
++  if (gcompris_get_properties()->fullscreen &&
++      !gcompris_get_properties()->noxf86vm)   
++    {
++      memset(&gcompris_last_configure_event, 0, sizeof(GdkEventConfigure));
++      gtk_widget_add_events(GTK_WIDGET(conf_window), GDK_STRUCTURE_MASK);
++      gtk_signal_connect (GTK_OBJECT (conf_window), "configure_event",
++        GTK_SIGNAL_FUNC (gcompris_conf_window_configured), 0);
++    }
++  else
++#endif
++      gtk_window_set_position (conf_window,
+ 				   GTK_WIN_POS_CENTER_ALWAYS);
  
--/* XRANDR Available */
--#undef XRANDR
-+/* XF86VidMode Available */
-+#undef XF86_VIDMODE
+   gtk_widget_show(GTK_WIDGET(conf_window));
 --- gcompris-7.4/configure.in.xf86vm	2006-04-12 01:06:34.000000000 +0200
-+++ gcompris-7.4/configure.in	2006-05-11 09:42:18.000000000 +0200
++++ gcompris-7.4/configure.in	2006-05-13 14:16:46.000000000 +0200
 @@ -81,30 +81,30 @@
  
  AM_ICONV




More information about the fedora-extras-commits mailing list