> > In Sugar, there's always one and only one active activity. You can see > which it is by looking at the icon below the XO in the favorites view > or by looking at the selected activity button in the top frame. This > is the activity that will be brought to the front when you go to the > Activity zoom level. > > I'm guessing Measure uses its "active activity" status to decide if it > should update itself or not, but from earlier emails I think the > desired behavior is rather to stop updating while the activity window > is not visible. For this, the activity author can use the information > that the window manager (or is it X?) provides to each top level > window, in pygtk: > > > http://pygtk.org/docs/pygtk/class-gtkwidget.html#signal-gtkwidget--visibility-notify-event > > Just listen for that signal and check the value of event.state, it can > be one of gtk.gdk.VISIBILITY_FULLY_OBSCURED, > gtk.gdk.VISIBILITY_PARTIAL or gtk.gdk.VISIBILITY_UNOBSCURED. You will > want to stop updating the screen when fully obscured and update it > otherwise. > > Faisal, could you please update the almanac with this info? >
The basics of this idea are in the almanac: http://wiki.laptop.org/go/Sugar_Almanac#How_do_I_know_when_my_activity_is_.22active.22_or_not.3F
_______________________________________________ Sugar mailing list [email protected] http://lists.laptop.org/listinfo/sugar

