Re: [AD] Allegro 4.0.3 beta1

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> 4.0.3:
> Auto fullscreen
> Auto windowed
> DGA 1.0
> DGA 1.0 window
> X11 fullscreen
> X11 window

I can't reproduce on my system (Red Hat 7.3, XFree86 4.2.0). Could you try to 
uninstall/reinstall the 4.0.3 version and check that everything is ok in the 
/usr/local/lib/allegro directory ?

> Another strange thing, not so much related to 4.0.3: I've had problems
> for about a year or more (since about 3.9.36) that when I would try to
> set X11 fullscreen as a graphics mode (both as root and as a normal
> user) I get the following error:
>
> [hein@xxxxxxxxxx demo]# ./demo
> Error setting 8bpp graphics mode
> Can not grab mouse
>
> Both the demo program and my own programs consistently show this
> behaviour. I just found out however that the tests/test program DOES
> set the x11 fullscreen mode correctly, both as a user and as root!
> This works for both 4.0.3 and 4.1.8. Any idea where I can look for the
> difference between demo and test? The error above I get on both redhat
> (6.2, 7.1, 7.2) and debian (latest) systems, with X ranging from 4.0.1
> to 4.1 (and possibly 3.?, not sure though), always consistently.

The attached patch fixed the problem on my system. Could you try it ?

Peter, what do you think about it ? The (0 && ...) part is the fix, while the 
various XSync() are needed in order to make the window fully visible.

-- 
Eric Botcazou
--- /home/eric/cvs/allegro/src/x/xwin.c	Fri Nov 15 12:07:49 2002
+++ allegro/src/x/xwin.c	Sun Jan 12 23:13:03 2003
@@ -689,7 +689,7 @@
 
 #ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE
    /* If we are going fullscreen, disable window decorations.  */
-   if (fullscreen) {
+   if (0 && fullscreen) {
       setattr.override_redirect = True;
       XChangeWindowAttributes(_xwin.display, _xwin.window,
 			      CWOverrideRedirect, &setattr);
@@ -717,9 +717,13 @@
       XMoveWindow(_xwin.display, _xwin.window, 0, 0);
       XF86VidModeSetViewPort(_xwin.display, _xwin.screen, 0, 0);
       XWarpPointer(_xwin.display, None, _xwin.window, 0, 0, 0, 0, 0, 0);
+      XSync(_xwin.display, False);
       XWarpPointer(_xwin.display, None, _xwin.window, 0, 0, 0, 0, w - 1, 0);
+      XSync(_xwin.display, False);
       XWarpPointer(_xwin.display, None, _xwin.window, 0, 0, 0, 0, 0, h - 1);
+      XSync(_xwin.display, False);
       XWarpPointer(_xwin.display, None, _xwin.window, 0, 0, 0, 0, w - 1, h - 1);
+      XSync(_xwin.display, False);
       XWarpPointer(_xwin.display, None, _xwin.window, 0, 0, 0, 0, w / 2, h / 2);
       XSync(_xwin.display, False);
 	  


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/