No. Only X11, e.g. GNU/Linux (and I think Mac OS X is another example).
If you really want to use toggle_fullscreen when the program is run on X11
without also sacrificing platform-independence, you could do something like:
fullscreen = not fullscreen
if not pygame.display.toggle_fullscreen():
if fullscreen:
window = pygame.display.set_mode(size, FULLSCREEN)
else:
window = pygame.display.set_mode(size)
That's of course assuming that the most recent comment in the docs (from
12/30/2010) is right about what pygame.display.toggle_fullscreen returns.
--- On Wed, 5/9/12, Bartosz Debski <[email protected]> wrote:
> From: Bartosz Debski <[email protected]>
> Subject: Re: [pygame] Resetting display
> To: [email protected]
> Date: Wednesday, May 9, 2012, 11:31 AM
> Well, i haven't tried to be honest
> but will toggle_fullscreen work
> under Windows ?
>
> On Tue, May 8, 2012 at 10:32 AM, Radomir Dopieralski
> <[email protected]>
> wrote:
> > On Tue, May 8, 2012 at 11:12 AM, Bartosz Debski <[email protected]>
> wrote:
> >> toggle_fullscreen will work only under X11.
> >
> > I didn't know you could run pygame outside of X11.
> >
> > [...]
> >
> > --
> > Radomir Dopieralski
>