[sugar] [PATCH 2/6] Implement API to handle tabbing.

Benjamin Berg benjamin
Fri Jun 20 09:04:12 EDT 2008


On Fri, 2008-06-20 at 11:19 +0200, Marco Pesenti Gritti wrote:
> On Thu, Jun 19, 2008 at 9:08 PM, Benjamin Berg
> <benjamin at sipsolutions.net> 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.laptop.org/pipermail/sugar/attachments/20080620/41c3922f/attachment.pgp 



More information about the Sugar-devel mailing list