Issue setting Kivy to fullscreen

Pototo picture Pototo · Feb 19, 2014 · Viewed 19k times · Source

I'm trying to write an application that runs kivy at full screen. But these are my issues:

1) When I run the command:

#Config.set('graphics', 'fullscreen', 1)

Then kivy appears to go full time, but the window has a lot of black spaces around the background image. Even if I elongate the image, kivy just cuts the image when showing it.

2) When I run this command to set the window size to the size of my screen:

Config.set('graphics', 'width', '1366')
Config.set('graphics', 'height', '768')

This way actually gives me a better result than full screen, but kivy returns a height parameter of only 715 instead of the 768, which is the value I told kivy to use (as you can see in the Config.set() function above).

My screen resolution is 1366x768

How can I solve this issue and make my kivy app go real full screen?

Thank you very much

Answer

ZenCODE picture ZenCODE · Feb 20, 2014

Try

from kivy.core.window import Window
Window.fullscreen = True

Do this before you App.run() method, and it should switch to fullscreen mode.

Cheers