Fix laptop screen being off when opening the lid
ClosedPublic

Authored by nicolasfella on Oct 16 2019, 11:31 PM.

Details

Summary

filePath() returns the full path to the config file. readFile() then prepends configsDirPath() to the path, leading to a garbled file path and making it impossible to load the right file. We should instead just pass id() + _lidOpen to readFile.

BUG: 371447

Test Plan

Connected a monitor to my laptop. Closed and reopened the lid.
Before:
Laptop screen was off. Needed turning on in the KCM.
After:
Laptop screen is on.

Both X11 and Wayland

Diff Detail

Repository
R104 KScreen
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nicolasfella created this revision.Oct 16 2019, 11:31 PM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 16 2019, 11:31 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
nicolasfella requested review of this revision.Oct 16 2019, 11:31 PM
nicolasfella edited the summary of this revision. (Show Details)Oct 16 2019, 11:32 PM
romangg requested changes to this revision.Oct 17 2019, 2:46 AM
romangg added inline comments.
kded/config.cpp
87–88

Rename variable

88–90

configsDirPath() needs to be prepended here now.

This revision now requires changes to proceed.Oct 17 2019, 2:46 AM

DId you test with the most recent revision? The code is right in theory here. But if there is a problem with it now, we have some other problem at some other position. I'm asking because there were reports in the past about the lid open configuration being broken.

romangg accepted this revision.Oct 17 2019, 1:43 PM

👍

5.17

This revision is now accepted and ready to land.Oct 17 2019, 1:43 PM
This revision was automatically updated to reflect the committed changes.