mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
WindowServer: Re-use existing Screen instances and improve fallbacks
If a screen layout cannot be applied, instead of failing to start WindowServer try to fall back to an auto-generated screen layout with the devices that are detected. Also, be a bit smarter about changing the current screen layout. Instead of closing all framebuffers and bringing them back up, keep what we can and only change resolution on those that we need to change them on. To make this work we also need to move away from using an array of structures to hold compositor related per-screen data to attaching it to the Screen itself, which makes re-using a screen much simpler.
This commit is contained in:
parent
1ecb725357
commit
dbb9f891fb
7 changed files with 483 additions and 190 deletions
|
@ -35,7 +35,7 @@ public:
|
|||
unsigned main_screen_index { 0 };
|
||||
|
||||
bool is_valid(String* error_msg = nullptr) const;
|
||||
void normalize();
|
||||
bool normalize();
|
||||
bool load_config(const Core::ConfigFile& config_file, String* error_msg = nullptr);
|
||||
bool save_config(Core::ConfigFile& config_file, bool sync = true) const;
|
||||
bool try_auto_add_framebuffer(String const&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue