Bug 301903

Summary: Battery widget does unnecessary repaints
Product: [Unmaintained] plasma4 Reporter: Eckhart Wörner <ewoerner>
Component: widget-batteryAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: kde, markg85, notmart, russianneuromancer
Priority: NOR    
Version: 4.8.90 (beta2)   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Eckhart Wörner 2012-06-14 13:28:29 UTC
The battery widget repaints itself regularly, even though the icon itself doesn't change. This is probably caused by changes in the remaining capacity of the battery.
Unnecessary repaints reduce battery life on mobile and laptop devices, as they wake up the gpu.

Reproducible: Always

Steps to Reproduce:
1. Enable the "show paint area" effect of kwin
2. Wait some time (depends on battery capacity and power consumption of the particular device)
Comment 1 Mark 2012-06-19 22:44:32 UTC
*** Bug 302034 has been marked as a duplicate of this bug. ***
Comment 2 Mark 2012-06-19 22:56:08 UTC
It is likely a regression since the applet is completely rewritten in QML.
Comment 3 Eckhart Wörner 2012-06-19 22:58:50 UTC
I just checked, the unnecessary repaints predate the rewrite.
Comment 4 Mark 2012-06-19 23:02:24 UTC
(In reply to comment #3)
> I just checked, the unnecessary repaints predate the rewrite.

Then it's a good point for improvement :)
Comment 5 Marco Martin 2012-06-20 12:07:48 UTC
Git commit 81cf79994a067f7c9d7952240105d9acf92a2fc2 by Marco Martin.
Committed on 20/06/2012 at 14:06.
Pushed by mart into branch 'master'.

avoid repaints when the same id is set again

M  +4    -0    plasma/declarativeimports/core/svgitem.cpp

http://commits.kde.org/kde-runtime/81cf79994a067f7c9d7952240105d9acf92a2fc2
Comment 6 Marco Martin 2012-06-20 12:08:51 UTC
probably the repaint problem before is unrelated to the repaint problem now, because is a completely different implementation

the above commit should at least partly solve it, not sure if completely tough
Comment 7 David Edmundson 2013-02-04 15:07:23 UTC
Just ran for > 4 minutes with the kwin effect on not touching anything. The battery applet did not repaint.
Closing as fixed. Please reopen if you still encounter an issue.