diff options
author | Dan Winship <dwinship@redhat.com> | 2007-08-06 13:23:45 (GMT) |
---|---|---|
committer | Dan Winship <dwinship@redhat.com> | 2007-08-06 13:25:42 (GMT) |
commit | 56d8e5e748324cc1b2bc574803497b7c2432a37f (patch) | |
tree | 66345f20b12ded0b96039a455f8305ffdd6286f9 /shell | |
parent | 88401d31b4fb53d1b82c76f978907e2d40ae552f (diff) |
Don't use gtk.get_current_event_time() as the timestamp for window.activate()
gtk.get_current_event_time() will return 0 if there's no "current
event" (which will happen if this is invoked from a SugarKeyGrabber
callback, because that intercepts events below the gtk level). And
libwnck will g_warn if we pass "0" to window.activate(). Since
matchbox doesn't look at the timestamp anyway, it's simplest to just
always pass "1" there.
(Needed for part of #2159)
Diffstat (limited to 'shell')
-rw-r--r-- | shell/view/ActivityHost.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/shell/view/ActivityHost.py b/shell/view/ActivityHost.py index 1d3a32d..fa3aaf6 100644 --- a/shell/view/ActivityHost.py +++ b/shell/view/ActivityHost.py @@ -65,10 +65,15 @@ class ActivityHost: pass def present(self): - self._window.activate(gtk.get_current_event_time()) + # wnck.Window.activate() expects a timestamp, but we don't + # always have one, and libwnck will complain if we pass "0", + # and matchbox doesn't look at the timestamp anyway. So we + # just always pass "1". + self._window.activate(1) def close(self): - self._window.close(gtk.get_current_event_time()) + # The "1" is a fake timestamp as with present() + self._window.close(1) def show_dialog(self, dialog): dialog.show() |