Skip to content

Instantly share code, notes, and snippets.

@kived
Created January 12, 2015 23:31
Show Gist options
  • Save kived/fb131aa70f9d6262d04c to your computer and use it in GitHub Desktop.
Save kived/fb131aa70f9d6262d04c to your computer and use it in GitHub Desktop.
Kivy: fix title and icon flash
diff --git a/kivy/app.py b/kivy/app.py
index db7e37c..f25c341 100644
--- a/kivy/app.py
+++ b/kivy/app.py
@@ -803,8 +803,6 @@ class App(EventDispatcher):
if not isinstance(self.root, Widget):
Logger.critical('App.root must be an _instance_ of Widget')
raise Exception('Invalid instance in App.root')
- from kivy.core.window import Window
- Window.add_widget(self.root)
# Check if the window is already created
from kivy.base import EventLoop
@@ -816,6 +814,8 @@ class App(EventDispatcher):
if icon:
window.set_icon(icon)
self._install_settings_keys(window)
+ if self.root:
+ window.add_widget(self.root)
else:
Logger.critical("Application: No window is created."
" Terminating application run.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment