feat: implement shim mode, rewrote / major refactor of config system #23
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
BuddiesOfBudgie/budgie-desktop-services!23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/builtin-modechange-test"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This commit introduces a new "shim mode" for Budgie Desktop Services display configuration. The intent of this shim mode is enable external applications such as wdisplays to directly modify the compositor state and directly update our configuration (by virtue of our service listening for event changes for the wlr output heads). This shim configuration uses an absolute positioning system rather than our relative positioning system for non-shim mode (which we'll use for Budgie 11 via Budgie Display Configurator).
To facilitate this, there is now check in SysInfo for BUDGIE_SESSION_VERSION as that was newly introduced for Budgie 10.10. When the version starts with 10.10 (so can be 10.10.1, or even our preview builds), we turn on shim mode and do the following:
The process is also now a QGuiApplication, at least for now. The reason for this is QGuiApplications under Wayland are exposed to the QtWayland QPA platform, which handles the wayland events in a non-blocking way and makes it easier for us to set up a connectionthread via KWayland. This seems to enable to event loop to not get stuck on the queue or dispatches, whatever devilry was basically causing our application to not receive any Wayland events!
Another change was to our built-in detection and ensuring that against built-in monitors we just always try to apply a custom mode since the display (e.g. on my Thinkpad) doesn't have good EDID and only reports one mode and not any other mode capabilities (reports 4k, no 1440p, 1080, etc.).
Fixes #15
Fixes #22
This is a lot of code, but it looks rather simple and reasonable.
As Neal said, there is a lot here, so I didn't do a super deep dive. I did notice a couple of formatting things. Also curious about the use of TitleCase for property names instead of camelCase. Are we doing that everywhere, and I just haven't noticed? xD
@ -0,0 +150,4 @@head->setHorizontalAnchoring(horizontalAnchor);head->setVerticalAnchoring(verticalAnchor);}} else {Extra indent.
@ -0,0 +186,4 @@// Set primary output if specifiedauto primaryOutput = StoredPrimaryOutputIdentifier();if (!primaryOutput.isEmpty()) {qDebug() << "Primary output:" << primaryOutput;Missing indentation.
Dunno why clang-format isn't fixing those 🫠
No it should probably be lowerCamelCase. I'll get those fixed 👍