[sugar] [PATCH] Fixing timestamp issue on wnck.Window.activate()
Sayamindu Dasgupta
sayamindu
Wed Jun 4 13:37:22 EDT 2008
On Wed, Jun 4, 2008 at 10:38 PM, Marco Pesenti Gritti
<mpgritti at gmail.com> wrote:
> def present(self):
> - # 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)
> + self._window.activate(gtk.get_current_event_time())
>
> Since you can't be sure of where present() will be called from (an
> event or not), I'd rather pass in a timestamp to method.
Hmm - but passing 1 does not seem to work in case of Metacity, The
documentation for gtk.get_current_event_time() suggests that 0L is
returned if there is no current event.
>
> - previous_activity.get_window().activate(1)
> + previous_activity.get_window().activate(gtk.get_current_event_time())
>
> Same as above, and you are exceeding 80 cols.
>
Oops - sorry about the 80 columns :-P.
Cheers,
Sayamindu
--
Sayamindu Dasgupta
[http://sayamindu.randomink.org/ramblings]
More information about the Sugar-devel
mailing list