make set_active() asynchronous (fix for 2230)

This commit is contained in:
Bert Freudenberg 2007-07-17 07:34:03 +02:00
parent e78c0106ce
commit b87b375bf7

View File

@ -132,12 +132,22 @@ class HomeModel(gobject.GObject):
if old_activity:
service = old_activity.get_service()
if service:
service.set_active(False)
service.set_active(False,
reply_handler=self._set_active_success,
error_handler=self._set_active_error)
if new_activity:
service = new_activity.get_service()
if service:
service.set_active(True)
service.set_active(True,
reply_handler=self._set_active_success,
error_handler=self._set_active_error)
def _set_active_success(self):
pass
def _set_active_error(self, err):
logging.error("set_active() failed: %s" % err)
def _active_window_changed_cb(self, screen):
window = screen.get_active_window()