New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a .display-layout configuration file #2832
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the one thing looks good to me
src/miral/static_display_config.cpp
Outdated
std::lock_guard lock{mutex}; | ||
if (!config_path_) return; | ||
|
||
if (std::ifstream layout_file{config_path_.value() + "/" + basename + "-layout"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "-layout"
string literal only appears twice, but still seems like it would be a better idea to not repeat it. You could have a const global, a layout_override_for_basename(basename)
standalone helper or something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
This allows the active display layout to switched without restarting Frame requires canonical/mir#2832 to work
In cases where a .display configuration fle is used add an additional .display-layout configuration file.
Creating or updating this file will update the active display layout.