def _check_for_window_manager(screen): wm_name = screen.get_window_manager_name() if wm_name is None: return screen.disconnect_by_func(__window_manager_changed_cb) setup_window_manager() global _window_manager_started _window_manager_started = True global _starting_desktop if _starting_desktop: _complete_desktop_startup()