SUMMARY The title says it - no matter which display is set to primary, all displays are set to primary. STEPS TO REPRODUCE 1. set one of two (or more) displays to primary OBSERVED RESULT check config - all displays are primary now EXPECTED RESULT only one display should be primary SOFTWARE/OS VERSIONS Linux: ArchLinux - up2date - no KDE instead LXQT (available in About System) KDE Frameworks Version: libkscreen - 2.27.5 Qt Version: 5.15.10 ADDITIONAL INFORMATION code which is probably wrong -> https://github.com/KDE/libkscreen/blob/v5.27.5/src/output.cpp#L499 working version -> https://github.com/KDE/libkscreen/blob/v5.26.5/src/output.cpp#L513 Thanks for pointing out to tsujan from the lxqt team! The github issue with the post -> https://github.com/lxqt/lxqt-config/issues/925#issuecomment-1465060151
KDE Frameworks Version: libkscreen - 5.27.5-1 wrong version entered
@ratijas - could you please have a look? thx
[[replied on GitHub, copy-pasting my reply here]] I apologize for the mistake we made during refactoring. > setPrimary() ignores its argument. My guess is that it's an incomplete draft that has popped up in the release by mistake Less like a draft, and more like a rotten piece that was left around unused by libkscreen and thus untested. 🥴 The call to `setPriority(1)` should be guarded by an `if (primary)` condition. But there's not much meaningful we can do for the reverse `!primary` case. > they have a plan to give priorities to outputs, instead of making one of them primary Indeed, the new and more robust way is to set priorities, which are also maintained to be unique and sequential by the Config object. One should not call priority-related methods on Outputs directly. I wanted to make them protected from outside access (`friend class Config`) but that proposal got rejected. > Maybe the "bug" was introduced to get people to migrate to a "new API"? Most certainly not. But if your code calls `Output::setPrimary`, it better be ported to `config->setPrimaryOutput`
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libkscreen/-/merge_requests/143
Git commit a302c17e95df535bde9232516092d77b34143503 by ivan tkachenko. Committed on 01/07/2023 at 10:33. Pushed by ratijas into branch 'master'. Guard the deprecated Output::setPrimary Unsetting primary state directly on an output is not supported, but at least we should properly warn about it instead of silently ignoring the meaningless argument. FIXED-IN: 5.27.7 M +6 -1 src/output.cpp https://invent.kde.org/plasma/libkscreen/-/commit/a302c17e95df535bde9232516092d77b34143503
Git commit b51a11b9030f70af2f114470bebf0ae70c082d9e by ivan tkachenko. Committed on 01/07/2023 at 12:14. Pushed by ratijas into branch 'Plasma/5.27'. Guard the deprecated Output::setPrimary Unsetting primary state directly on an output is not supported, but at least we should properly warn about it instead of silently ignoring the meaningless argument. FIXED-IN: 5.27.7 (cherry picked from commit a302c17e95df535bde9232516092d77b34143503) M +6 -1 src/output.cpp https://invent.kde.org/plasma/libkscreen/-/commit/b51a11b9030f70af2f114470bebf0ae70c082d9e
Great, thanks alot!