[patch] reduce CPU usage when minimized

Martin Koller m.koller at surfeu.at
Sat Dec 30 01:26:42 GMT 2006


On Sa Dez 30 2006, Mark Rose wrote:
> On Friday 29 December 2006 5:48 pm, Martin Koller wrote:
> > Hi,
> >
> > I like to include the following patch into 3.5 (and 4) to fix the bug
> > http://bugs.kde.org/show_bug.cgi?id=91240
> > (CPU is used for animations even if konqueror is minimized)
> >
> > Is this ok for you ?
>
> Would this patch apply to any time an animation is not visible on the
> screen?
> This could create a problem when animations on a scrolling webpage 
> are synchronized, but that case is/would be rare.

No (I think there is no way to get the information when a widget is covered by 
another window).
From Qt-docs:
"A widget receives show and hide events when its visibility status changes. 
Between a hide and a show event, there is no need to waste CPU cycles 
preparing or displaying information to the user. A video application, for 
example, might simply stop generating new frames. 
 A widget that happens to be obscured by other windows on the screen is 
considered to be visible."

This is what the patch does: It pauses the animations in the hideEvent and 
resumes in the showEvent

> Would this patch also 
> stop animations on an inactive tab? That would be excellent.

Yes, it does!

-- 
Best regards/Schöne Grüße

Martin    ()  ascii ribbon campaign - against html mail 
          /\                        - against microsoft attachments

Computers and Internet gave you freedom.
TCPA would TAKE your FREEDOM!  http://www.againsttcpa.com




More information about the kfm-devel mailing list