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