Bug 264702 - [PATCH] Disabled outputs can't be saved properly
Summary: [PATCH] Disabled outputs can't be saved properly
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_randr (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Gustavo Pichorim Boiko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-29 03:01 UTC by Alexey Chernov
Modified: 2011-02-04 10:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Solves the problem with unsaved disabled outputs (1.28 KB, patch)
2011-01-29 03:01 UTC, Alexey Chernov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Chernov 2011-01-29 03:01:19 UTC
Created attachment 56598 [details]
Solves the problem with unsaved disabled outputs

Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

Outputs which were firstly enabled and then were disabled by user can't be stored to krandrrc properly due to cyclic dependency in RandROutput::slotDisable() method: it tries to void rect and refreshrate using RandROutput::proposeRect() and RandROutput::proposeRefreshRate() methods which in turn try to enable the output. So in RandROutput::save() it's treated as enabled and the fact that it's actually disabled isn't saved.
I removed unnecessary proposeRect() and proposeRefreshRate() calls from slotDisable() and also added to RandROutput::applyProposed() special case to save always if the output is disabled (as we don't have something like proposeActive var and I don't think it's necessary).

Reproducible: Always

Steps to Reproduce:
1. Enable one of the outputs. Apply the results. See that it was saved to ~/.kde/share/config/krandrrc
2. Disable it. Apply the results. See that settings on krandrrc weren't changed for the output.
Comment 1 Aaron J. Seigo 2011-02-04 08:24:23 UTC
Git commit 0040d4b70e2c4bc4c4fe4fb33cf0018d430a2205 by Aaron Seigo.
Committed on 04/02/11 at 08:16.
Pushed by aseigo into branch 'KDE/4.6'.

save disabled screens, don't enable by accident

based on a patch by Alexey Chernov
BUG:264702

M  +18   -9    kcontrol/randr/randroutput.cpp     

http://commits.kde.org/kde-workspace/0040d4b70e2c4bc4c4fe4fb33cf0018d430a2205
Comment 2 Aaron J. Seigo 2011-02-04 08:24:23 UTC
Git commit 39dd0dd2946cc864f884e32ad3dbb43055f56f12 by Aaron Seigo.
Committed on 04/02/11 at 08:16.
Pushed by aseigo into branch 'master'.

save disabled screens, don't enable by accident

based on a patch by Alexey Chernov
BUG:264702

M  +18   -9    kcontrol/randr/randroutput.cpp     

http://commits.kde.org/kde-workspace/39dd0dd2946cc864f884e32ad3dbb43055f56f12
Comment 3 Alexey Chernov 2011-02-04 10:38:49 UTC
Aaron, thank you very much for committing my patches!