[sugar] [PATCH] Fixing timestamp issue on wnck.Window.activate()
Sayamindu Dasgupta
sayamindu
Wed Jun 4 14:17:05 EDT 2008
On Wed, Jun 4, 2008 at 11:19 PM, Marco Pesenti Gritti
<mpgritti at gmail.com> wrote:
> On Wed, Jun 4, 2008 at 7:37 PM, Sayamindu Dasgupta <sayamindu at gmail.com> wrote:
>> 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.
>
> Sorry I was not clear enough... I was proposing to change the method
> to present(self, timestamp).
>
> Though I just looked at how gtk handles it and they seem to default to
> current time, providing a different method for the special cases
> (present_with_time).
>
> So in summary I think your patch is good except for the 80 line
> nitpick. Please fix that and check it in...
>
Fixed, committed and pushed to d.l.o.
Thanks,
Sayamindu
--
Sayamindu Dasgupta
[http://sayamindu.randomink.org/ramblings]
More information about the Sugar-devel
mailing list