[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] surface.get_flags() and pygame.FULLSCREEN



Sounds like it doesn't work the way you were hoping, but sounds like it's working perfectly to me. The display is still in fullscreen mode the entire time, it just happened to not be the active display for a while (your described test case wouldn't be any different than alt-tabbing away, In my opinion)

If I were you, I would try pygame.display.get_active to see if it will tell me if my fullscreen app is active or not, cause it sounds like that is what you are actually interested in here?


On Wed, Nov 26, 2008 at 3:35 AM, "Jørgen P. Tjernø" <jorgen@xxxxxxxxxx> wrote:
Hey!

Are you supposed to be able to test the "current" fullscreen state of the window you've created by using (surface.get_flags() & pygame.FULLSCREEN) == pygame.FULLSCREEN?

Because in my tests on pygame 1.7.1release-4.1ubuntu1, it doesn't.

To reproduce it, do as follows:

* Download the attached script, and change the resolution (1024, 768) to your monitors native resolution (so it won't have to change modes all the time).
* Start the program, and don't press anything
* SSH to your machine from another (so the fullscreen app still has focus), and start some fullscreen app that takes focus, e.g. mplayer (I use this command: DISPLAY=:0 mplayer -fs /tmp/series/RedAlert3RemixHD.mov  -ao null)
* Quit the fullscreen app (mplayer or whatever).

Now, it takes a few seconds for pygame to retake fullscreen mode (why is this?), but my prgoram NEVER prints "LOST FULLSCREEN".

Why is that? Is this a bug?

Ps. Press ESCAPE to exit test.py.

--
Kindest regards, Jørgen P. Tjernø.