Re: [AD] On the X11 Video Switching Patch

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


> This is just to assure you that you haven't been forgotten :-)
> Actually, I spent Sunday night without sleep rewriting the patch, to
> integrate it with the current code and not have so much duplication.

I'm sorry about the messy code.  I saw that Allegro's DGA driver did most of 
what I had been doing about a week after I wrote the code, and I just hadn't 
got around to rewriting it.

> I have a question though.  When using the video switching stuff, has
> your X server ever crashed (after several mode switches)?  I used to
> think it was a X server bug, but after playing around with SDL and a
> standalone switching program I wrote (neither of which crash the
> server), I'm not so sure.

I haven't had a problem with it personally, but I need to look at your 
rewrite.  I feel bad about it being so messy now, but at least I got it 
started.  What video card are you using?  It would be wise to check out the 
SDL code to see some of the hacks they did that I didn't implement.

> Otherwise, I still have to do the window decorations and viewport
> warping things, which keep evading me.  For a while, my solution was
> to move the window to the top left corner (so the window decorations
> are not visible) and move the viewport to (0,0), but I don't think
> that works in all situations.  Any ideas?  Want to take over for me?

I don't have the time to take over right now, unfortunately.  I wish the 
XWarpPointer hack would work, but alas, heheh.  SDL has an option that 
removes all the borders with cases for several window managers.  Here's what 
I did:  try commenting parts out of the SDL code that you think do the 
removing borders and completely recompile (at least I had to) and reinstall.  
Then try the test progs.

I think the code is SDL_NOFRAME, so grep it out under the x11 directory.  I 
tried to implement it in Allegro without any luck.  The DGA non-fullscreen 
driver did no frame, but I guess it just directly drew to the screen.  Wine 
seems to have some system like that took, and has an option if you want the 
window manager to handle it.  Also, try switching your desktop (ie in Gnome 
or KDE) while an Allegro program is running.  When you go back to the desktop 
with the Allegro app, the mouse isn't grabbed and such.  Unless of course you 
fixed that (haven't got the CVS yet).

The SDL code seems to work quite well, so maybe an examination of that might 
help someone out.  Other possibilities include Wine and ClanLib.  Peter, I 
also sent a copy to the Allegro developers list so anyone who is willing to 
help can.  Again, Peter, I'm ashamed of my initial code writing (I wasn't 
familiar with Allegro or Xlib at all), and I intended to rewrite it, 
but...well...you know how it goes, heh.  I'm just glad there's dedicated 
people that can help with this stuff.  ;-)

Good luck to anyone with the SDL code and trying to emulate its behavior--I 
didn't have much luck for removing the borders (it worked once, hehe).  As 
for the random crashes, I don't know.  I'll look over the code in a while and 
see if I don't catch anything.  If you get a crash, try gdb or something.  
Thanks for all the help Peter.  :)

Also, I'd be interested perhaps in being on the developer's list for CVS.  I 
don't know how to go about this and I'm not as familiar with it as I should 
be (I just got a Linux Game Programming book, which is edited by Andre 
Lamothe, one of my heros back from the 386 days...there might be something to 
help us out in there).  Anyways, I'm ranting now.  ;-) I'm glad that the 
patch is at least in there!

-- 
~StoverTech~
Benjamin Joel Stover



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