SDL and fullscreen

Wondering if it’s just me…

Trying 3 different platforms with my application and full-screen graphics
and getting some weird issues.

Firstly, the application runs fine in a window, but I want the option of
full-screen at some point…

On my current desktop - it’s an older AMD chip with SiS graphics running
Debian Stable (Squeeze) and Xfce4.

I go into full-screen mode:

if ((myScreen = SDL_SetVideoMode (screenWidth, screenHeight, 32, SDL_SWSURFACE | SDL_FULLSCREEN)) == NULL)

and it works OK - until I exit the application with a nice

 SDL_Quit () ;

then it goes weird. It moves all the existing windows, usually to the
far-left of each virtual window (I run a 3x3 virtual desktop). This is
annoying as I then have to re-position them.

This seems to be the same for other full-screen SDL apps. too - e.g. HPAs
little game posted here recently…

Then I have 2 laptops - both run Debian Lenny with xfce4, although a
slightly different layout to my workstation one - the first is an Acer
Aspire One - Intel Atom, intel graphics - this actually works OK. App.
run, enters full screen, does it thing, then exits and windows appear to
be OK. The other Laptop, Acer Aspire, AMD processor, ATI graphics, and
this sort of works OK until application exit time when it goes back to X,
the mouse moves and is visible, but everything else is black. Needs
Ctrl-Backspace to kill & restart X.

Sooooo… Am I doing anything obviously wrong?

Or is it just an artifact of my (older!) hardware.

(Actually, I have just tested it on my Wifes PC - New, Shiny, Debian
Squeeze, Intel graphics, huge screen, etc. and it works perfectly…)

My suspicion is that I have crappy old hardware, but just in-case I’m
missing a trick, I’d appreciate any feedback!

Thanks,

Gordon

My suspicion is that I have crappy old hardware, but just in-case I’m missing
a trick, I’d appreciate any feedback!

Some more experimentation and I’m sure this is the reason (crappy
hardware) - playing with TuxPaint, it does exactly the same thing on my
desktop and one latop when I put it into full-screen mode - it runs OK
until it exits then (on my desktop), all the windows have been shoved to
the left, somewhat!

Looks at some recents postings about exiting SDL, it seems the best way to
sort the problems is to never leave…

GordonOn Sat, 10 Mar 2012, Gordon Henderson wrote:

My suspicion is that I have crappy old hardware, but just in-case I’m
missing a trick, I’d appreciate any feedback!

Some more experimentation and I’m sure this is the reason (crappy hardware) -
playing with TuxPaint, it does exactly the same thing on my desktop and one
latop when I put it into full-screen mode - it runs OK until it exits then
(on my desktop), all the windows have been shoved to the left, somewhat!

I think I’ve worked this one out - if anyone cares :slight_smile: It’s a combination
of my window manager (xfce4) and using a full-screen mode in my
application that’s smaller than my normal X window mode - so switching to
640x480 in fullscreen mode causes the window manager to see the switch to
640x480 and moves the windows…

Had some fun picking hardware sizes - if I run my app. in 320x200, full
screen, then it sometimes puts up a little X window, then after a few
seconds it switches to full screen mode. Not sure what that’s about!

GordonOn Sun, 11 Mar 2012, Gordon Henderson wrote:

On Sat, 10 Mar 2012, Gordon Henderson wrote: