[sugar] Another pass through some basic Activity test results
Tomeu Vizoso
tomeu
Mon Sep 29 03:54:48 EDT 2008
On Sun, Sep 28, 2008 at 2:32 AM, Gary C Martin <gary at garycmartin.com> wrote:
> On 26 Sep 2008, at 19:31, Arjun Sarwal wrote:
>
>> Hi,
>>
>> 2008/9/26 Gary C Martin <gary at garycmartin.com>:
>>> Here's a set of basic Activity test results for build 8.2-763, hope
>>> the ASCI
>>> art doesn't get too mangled by the list server (need to view with a
>>> fixed
>>> Measure-20 . . - . x x x . x Doesn't sleep when Activity is
>>> in the
>>> background (eats 75% cpu). Can't
>>> seem to
>>> record anything. Keep error when
>>
>> -- When Measure is in background and some other Activity comes in
>> foreground, then Measure releases sound device - you can record sound
>> using any other program/application. In this state Measure also
>> doesn't hog CPU.
>
> Just testing with Measure-21 and 8.2-765, yes I see this now. However
> switching to any of the Neighborhood/Group/Home views does not seem
> count as putting Measure into the background, it still consumes the
> cpu and claims the sound input device. I'm guessing this is a Sugar
> behaviour? Is this a bug or a feature (feels like a Sugar bug that
> would make the UI sluggish for no go reason)?
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?
Thanks,
Tomeu
More information about the Sugar-devel
mailing list