Fix handling of the no activities case

This commit is contained in:
Marco Pesenti Gritti 2006-12-24 15:58:53 +01:00
parent b3c2368eac
commit a4e1b6b3ff
2 changed files with 8 additions and 2 deletions

View File

@ -70,7 +70,10 @@ class HomeModel(gobject.GObject):
def _active_window_changed_cb(self, screen):
window = screen.get_active_window()
if not window or window.get_window_type() != wnck.WINDOW_NORMAL:
if window == None:
self.emit('active-activity-changed', None)
return
if window.get_window_type() != wnck.WINDOW_NORMAL:
return
xid = window.get_xid()

View File

@ -142,7 +142,10 @@ class Shell(gobject.GObject):
del self._hosts[xid]
def _active_activity_changed_cb(self, home_model, home_activity):
host = self._hosts[home_activity.get_xid()]
if home_activity:
host = self._hosts[home_activity.get_xid()]
else:
host = None
if self._current_host:
self._current_host.set_active(False)