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

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



hi,


I think you can just do  (surface.get_flags() & pygame.FULLSCREEN).

Not entirely sure though...

cu.


On Wed, Nov 26, 2008 at 10:35 PM, "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ø.
>