Re: [AD] Re: [AL] Problems: Grabber and windowing |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> At request from Hein Zelle, I installed wmaker and did a short test on
> my system:
> Under wmaker, demo shows the "...Can not grab mouse." error message (but
> not the test program). Both plain X and Gnome2 don't exhibit any problem
> (using CVS with the 2 xwin.diff applied).
My bad... the first xwin.diff patch is bogus; could you try with the second
one only (attached again to this message) ?
> So this definitely has to do with the window manager, and with the
> difference between test and demo.
The only significant difference is that test.c makes 3 attempts at setting the
graphics mode, while demo.c makes only one. The patch instructs the driver to
make 2 attempts, which seems to be enough on my system. If it's not the case
on yours, could you try to instruct it to make 3 attempts too ?
--
Eric Botcazou
--- /home/eric/cvs/allegro/src/x/xwin.c Fri Nov 15 12:07:49 2002
+++ allegro/src/x/xwin.c Thu Jan 16 19:09:59 2003
@@ -763,8 +763,15 @@
BITMAP *bmp;
XLOCK();
bmp = _xwin_private_create_screen(drv, w, h, vw, vh, depth, fullscreen);
- if (bmp == 0)
+ if (bmp == 0) {
_xwin_private_destroy_screen();
+ /* Work around a weird bug probably caused by KWM. */
+ if (fullscreen) {
+ bmp = _xwin_private_create_screen(drv, w, h, vw, vh, depth, fullscreen);
+ if (bmp == 0)
+ _xwin_private_destroy_screen();
+ }
+ }
XUNLOCK();
return bmp;
}