<div dir="ltr"><br>> On Sun, Sep 28, 2008 at 6:02 AM, Gary C Martin <<a href="mailto:gary@garycmartin.com">gary@garycmartin.com</a>> wrote:<br>> > On 26 Sep 2008, at 19:31, Arjun Sarwal wrote:<br>> ><br>
> >> 2008/9/26 Gary C Martin <<a href="mailto:gary@garycmartin.com">gary@garycmartin.com</a>>:<br>> >>><br>> >>> Here's a set of basic Activity test results for build 8.2-763, hope the<br>
> >>> ASCI<br>> >>> art doesn't get too mangled by the list server (need to view with a fixed<br>> >>> Measure-20 . . - . x x x . x Doesn't sleep when Activity is in the<br>
> >>> background (eats 75% cpu). Can't seem<br>> >>> to<br>> >>> record anything. Keep error when<br>> >><br>
> >> -- When Measure is in background and some other Activity comes in<br>> >> foreground, then Measure releases sound device - you can record sound<br>> >> using any other program/application. In this state Measure also<br>
> >> doesn't hog CPU.<br>> ><br>> > Just testing with Measure-21 and 8.2-765, yes I see this now. However<br>> > switching to any of the Neighborhood/Group/Home views does not seem count as<br>
> > putting Measure into the background, it still consumes the cpu and claims<br>> > the sound input device. I'm guessing this is a Sugar behaviour? Is this a<br>> > bug or a feature (feels like a Sugar bug that would make the UI sluggish for<br>
> > no go reason)?<br>><br>> See #7856. Seems like a Sugar related issue to me. I had borrowed the<br>> code and concept from Record activity, which now apparently uses some<br>> other method to determine switch of view/context/activity.( I think<br>
> they detect whether one of the main gtk widgets is the topmost or not<br>> etc. not sure) I should try exploring that. Any help on this would be<br>> great.<br><br>Record listens for "visibility-notify-event":<br>
<br><div style="margin-left: 40px;">self.playOggWindow.add_events(gtk.gdk.VISIBILITY_NOTIFY_MASK)<br>self.playOggWindow.connect("visibility-notify-event", self._visibleNotifyCb)<br></div><br>Because Record has many different windows, we listen on each window and run through a series of checks on the callback to determine if it is the active activity anymore.<br>
<br>Be sure to look out for #5500 when trying to get access to a resource like the camera or microphone.<br><br> <br></div>