On Fri, 2008-06-20 at 11:19 +0200, Marco Pesenti Gritti wrote:
> On Thu, Jun 19, 2008 at 9:08 PM, Benjamin Berg
> <[EMAIL PROTECTED]> wrote:
> > +    def tabbing_activate_current(self):
> > +        home_model = self._model.get_home()
> > +        activity = home_model.get_active_activity()
> > +        if activity and activity.get_window():
> > +            activity.get_window().activate(1)
> 
> Do we get a window_changed even in the model even if the window has
> really been activated during the tabbing?

Yes. Because of this the model needs to ignore window changes during
tabbing. If the window changes were not ignored, a race condition
exists:
 - User tabs
 - Timeout to activate the window fires
 - User tabs
 - Window is raised a bit later
 - The homemodel emits active-activity-changed

And in the end the wrong button is selected in the activities tray (for
1/4 of a second).

Benjamin


Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar

Reply via email to