Bug 321823 - battery widget closes after clicking on brightness control slider
Summary: battery widget closes after clicking on brightness control slider
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Unmaintained
Component: widget-battery (show other bugs)
Version: 4.10.90
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 323109 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-07-01 12:00 UTC by rockonthemoonfm
Modified: 2014-04-20 13:47 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.9
Sentry Crash Report:


Attachments
Make the popup passive during brightness change (1.07 KB, patch)
2013-07-05 14:38 UTC, Kai Uwe Broulik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rockonthemoonfm 2013-07-01 12:00:30 UTC
if you want to change screen brightness from the new (: amazing) battery widget, the pop-up widget closes after clicking on the slider. so only 10% steps are allowed a time.

Reproducible: Always

Steps to Reproduce:
1. change brightness from battery widget
2. after clicking on the slider, pop-up widet closes
3.
Actual Results:  
only 10% brightness increase/decrease possible, because pop-up widget closes.

Expected Results:  
pop-up widget doesn't close, allowing the user to define desired brightness level.
Comment 1 Kai Uwe Broulik 2013-07-01 20:42:34 UTC
Weird, that bug used to be there some time ago but fixed. I cannot reproduce that issue. The dialog stays open correctly here.
Clicking the desired brightness directly, ie. moving the slider from 30% to 80% should be possible nontheless.
Comment 2 rockonthemoonfm 2013-07-02 08:54:37 UTC
"Clicking the desired brightness directly, ie. moving the slider from 30% to 80% should be possible nontheless." 

no, same behavior, widget pop-up closes. 
I wiped .kde4 folder from home but the same behavior persists.
Comment 3 Christoph Feck 2013-07-03 21:40:10 UTC
I can reproduce this bug on my system (today's master). It might be related to rounding. My system offers brightness in 7 levels (1...7), so for level 3 the percentage is around 43%, but the actual value displayed next to the slider is 40%.
Comment 4 Kai Uwe Broulik 2013-07-03 21:49:13 UTC
The backend unfortunately only supports 10 steps (something I want to change in the future though) but my keyboard backlight has 4 steps and the slider works just fine
Comment 5 Christoph Feck 2013-07-04 21:35:33 UTC
It happens when the battery is removed.
Comment 6 Kai Uwe Broulik 2013-07-05 14:33:21 UTC
(In reply to comment #5)
> It happens when the battery is removed.

Can you clarify this a bit? When I remove a battery, the dialog just stays open here, and what does it have to do with brightness?

Maybe making the dialog passive (ie. have it stay open like the calendar popup) during brightness change works around that.
Comment 7 Kai Uwe Broulik 2013-07-05 14:38:38 UTC
Created attachment 80973 [details]
Make the popup passive during brightness change

Can you test whether this patch helps?
Comment 8 Christoph Feck 2013-07-05 15:07:55 UTC
Patch does not help.

> Can you clarify this a bit? When I remove a battery, the dialog just stays open here, and what does it have to do with brightness?

Steps to reproduce:
- remove battery
- start plasma
- click on system tray expander to find hidden battery icon
- click battery icon to open the battery/brightness dialog
- try changing brightness using the slider

Actual Results:
- the battery popup closes during dragging of the slider
Comment 9 Kai Uwe Broulik 2013-07-08 15:06:41 UTC
Does it really only happen when there is no battery or always when the battery monitor is hidden in the systray popup? I tried by forcing it to Hide and still cannot reproduce :-(
Comment 10 rockonthemoonfm 2013-07-08 18:37:52 UTC
so i've tested all the configurations between battery not/present, cable un/plugged, widget auto/hidden/always_visible.

Bug is present only when cable is branched, no matter other conditions (battery presence/widget mode).
Comment 11 Kai Uwe Broulik 2013-07-09 14:12:02 UTC
Really weird. It only happens when the battery is not charging (full) and the AC is plugged in.
I can also observe it when I do
sleep 4; qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl setBrightness 50
and then open the battery monitor. It closes. But other plasmoids are not affected.
Comment 12 Kai Uwe Broulik 2013-08-03 22:26:38 UTC
*** Bug 323109 has been marked as a duplicate of this bug. ***
Comment 13 Kai Uwe Broulik 2013-08-29 20:24:10 UTC
It's not only the brightness slider, here also turning off and back on(!) Powermanagement closes the popup.
Comment 14 Simon Solinas 2013-09-10 16:50:18 UTC
Problem still present on KDE SC 4.11.0 and 4.11.1 on Arch with intel video driver. This problem doesn't exist on a system with catalyst driver.
Comment 15 Christoph Feck 2013-10-27 19:45:36 UTC
I am also using an intel machine. Could it be caused by two entries in /sys/class/backlight/ on my system?
Comment 16 Christoph Feck 2013-11-12 20:59:32 UTC
Bug 295982 comment #17 says it could be caused by losing the focus whenever the OSD appears. Would that make sense?
Comment 17 rockonthemoonfm 2013-11-12 22:24:04 UTC
as #13 here said, checking/unchecking Enable Power Management closes widget.

and I add, if I first uncheck Enable Power Management, the losing-focus bug is no more..
Comment 18 Christoph Feck 2013-12-31 05:00:51 UTC
Still reproducible on KDE 4.12.0.
Comment 19 Ovidiu D. Niţan 2014-01-22 18:17:18 UTC
I can reproduce this on KDE 4.12.0. Oddly, this happens only when my laptop's battery is full and the AC adapter is connected.
Comment 20 Ovidiu D. Niţan 2014-02-27 09:24:50 UTC
I found a workaround for this bug: add the battery monitor as a widget in the plasma panel, not in the system tray. This way the widget no longer closes itself on moving the brightness slider. The single disavantage I found is that the battery icon is a little blurry this way (maybe because of some scaling issue).
Comment 21 Kai Uwe Broulik 2014-02-27 11:05:42 UTC
Hmm, the icon shouldn't be blurry, since it's SVG (vector graphics).
Yes, it seems the auto-hide/plasmoid status feature is to blame for some reason, and this only affects the systray.
Comment 22 Ovidiu D. Niţan 2014-02-27 11:37:30 UTC
Also this bug also affect "Enhanced Battery Monitor" (http://kde-apps.org/content/show.php?content=153981) so I'm wonder if the issue is not somewhere else.
Comment 23 Christoph Feck 2014-03-07 12:46:20 UTC
So commit for bug 324847 also magically fixed this one. The reason is probably the removed "onDataChanged:" handling. Maybe this gives a hint how to debug it further in case the handling needs to be re-added to fix the regressions caused by the removal.
Comment 24 Kai Uwe Broulik 2014-04-20 13:47:32 UTC
Git commit 1c9cf5c37483924afd5690e82dcca8456d11c3bc by Kai Uwe Broulik.
Committed on 20/04/2014 at 13:44.
Pushed by broulik into branch 'KDE/4.11'.

Prevent popup from closing when changing brightness battery monitor is hidden in system tray

Touching the plasmoid status causes the popup to close. This patch does not touch the status
as long as the popup is open and defers that to when the popup closes.

REVIEW: 117533
FIXED-IN: 4.11.9

M  +5    -5    plasma/generic/applets/batterymonitor/contents/code/logic.js
M  +7    -1    plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml

http://commits.kde.org/kde-workspace/1c9cf5c37483924afd5690e82dcca8456d11c3bc