From ac07f9d08ea0bc377329968a7e168d17bbf108bb Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 5 Apr 2021 19:41:03 +0200 Subject: [PATCH] sculpt: skip GUI handling until framebuffer is up This avoids unneeded activity of the Leitzentrale GUI (e.g., the decorator) at the early boot phase of Sculpt. --- repos/gems/src/app/sculpt_manager/main.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc index 0db013f0ec..c608bf1a10 100644 --- a/repos/gems/src/app/sculpt_manager/main.cc +++ b/repos/gems/src/app/sculpt_manager/main.cc @@ -73,6 +73,8 @@ struct Sculpt::Main : Input_event_handler, Gui::Connection _gui { _env, "input" }; + bool _gui_mode_ready = false; /* becomes true once the graphics driver is up */ + Gui::Root _gui_root { _env, _heap, *this }; Signal_handler
_input_handler { @@ -1151,6 +1153,10 @@ struct Sculpt::Main : Input_event_handler, void Sculpt::Main::_handle_window_layout() { + /* skip window-layout handling (and decorator activity) while booting */ + if (!_gui_mode_ready) + return; + struct Decorator_margins { unsigned top = 0, bottom = 0, left = 0, right = 0; @@ -1377,6 +1383,9 @@ void Sculpt::Main::_handle_gui_mode() { Framebuffer::Mode const mode = _gui.mode(); + if (mode.area.count() > 1) + _gui_mode_ready = true; + _handle_window_layout(); _settings.manual_fonts_config = _fonts_config.try_generate_manually_managed();