kivy/kivy — pull request #2605 by dessant (2014-10-23 04:04:51+00:00)
Title: SDL2 - implement Window.fullscreen and toggle_fullscreen

This pr adds fullscreen mode selection for the sdl2 window provider (`Window.fullscreen` and `Window.toggle_fullscreen`) and it aims to fix https://github.com/kivy/kivy/issues/2151 for sdl2.

There will be three fullscreen modes (selectable from `Window.fullscreen`) that follow the sdl2 api ones: False, True, 'fake'.

https://wiki.libsdl.org/SDL_SetWindowFullscreen
"flags may be SDL_WINDOW_FULLSCREEN, for "real" fullscreen with a videomode change; SDL_WINDOW_FULLSCREEN_DESKTOP for "fake" fullscreen that takes the size of the desktop; and 0 for windowed mode."

Our current fullscreen options/modes are misleading or incorrect:
http://kivy.org/docs/api-kivy.config.html#module-kivy.config
"Activate fullscreen. If set to '1', a resolution of width times height pixels will be used. If set to 'auto', your current display’s resolution will be used instead. This is most likely what you want. If you want to place the window in another display, use 'fake' and adjust width, height, top and left."

We are calling 'fake fullscreen' what is esentially just a borderless window.

This pr does not affect pygame users, I would like to introduce the new modes in Config too, but only when we set sdl2 as the default window provider. To keep the current 'fake' behavior available, a 'bordered' or 'borderless' property and config option will be introduced.

For now, i have deprecated `toggle_fullscreen`, it made sense with pygame, but with sdl2 setting the mode explicitly with `Window.fullscreen` seems the correct way to go.
http://www.pygame.org/docs/ref/display.html#pygame.display.toggle_fullscreen