D24719: Fix laptop screen being off when opening the lid
This revision was automatically updated to reflect the committed changes. Closed by commit R104:e47dc21a7b78: Fix laptop screen being off when opening the lid (authored by nicolasfella). REPOSITORY R104 KScreen CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D24719?vs=68110=68179 REVISION DETAIL https://phabricator.kde.org/D24719 AFFECTED FILES kded/config.cpp To: nicolasfella, #plasma, romangg Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D24719: Fix laptop screen being off when opening the lid
romangg accepted this revision. romangg added a comment. This revision is now accepted and ready to land. 5.17 REPOSITORY R104 KScreen BRANCH fixit REVISION DETAIL https://phabricator.kde.org/D24719 To: nicolasfella, #plasma, romangg Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D24719: Fix laptop screen being off when opening the lid
nicolasfella added a comment. I tested it. REPOSITORY R104 KScreen REVISION DETAIL https://phabricator.kde.org/D24719 To: nicolasfella, #plasma, romangg Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D24719: Fix laptop screen being off when opening the lid
romangg added a comment. 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. REPOSITORY R104 KScreen REVISION DETAIL https://phabricator.kde.org/D24719 To: nicolasfella, #plasma, romangg Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D24719: Fix laptop screen being off when opening the lid
nicolasfella updated this revision to Diff 68110. nicolasfella added a comment. - Fixes REPOSITORY R104 KScreen CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D24719?vs=68099=68110 BRANCH fixit REVISION DETAIL https://phabricator.kde.org/D24719 AFFECTED FILES kded/config.cpp To: nicolasfella, #plasma, romangg Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D24719: Fix laptop screen being off when opening the lid
romangg requested changes to this revision. romangg added inline comments. This revision now requires changes to proceed. INLINE COMMENTS > config.cpp:88 > { > -const QString openLidFilePath = filePath() % > QStringLiteral("_lidOpened"); > +const QString openLidFilePath = id() % QStringLiteral("_lidOpened"); > auto config = readFile(openLidFilePath); Rename variable > config.cpp:90 > auto config = readFile(openLidFilePath); > QFile::remove(openLidFilePath); > return config; `configsDirPath()` needs to be prepended here now. REPOSITORY R104 KScreen REVISION DETAIL https://phabricator.kde.org/D24719 To: nicolasfella, #plasma, romangg Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D24719: Fix laptop screen being off when opening the lid
nicolasfella created this revision. nicolasfella added a reviewer: Plasma. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. nicolasfella requested review of this revision. REVISION 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. 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 REPOSITORY R104 KScreen BRANCH fixit REVISION DETAIL https://phabricator.kde.org/D24719 AFFECTED FILES kded/config.cpp To: nicolasfella, #plasma Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart