From 974627f7008bcb465421fbb3e1bdc9fe81650bf3 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 16 Nov 2021 09:03:14 +0100 Subject: [PATCH] vbox6: adapt to GUI framebuffer size on startup Explicitly, adapt to current framebuffer/window size after initialization finished. This ensures the use of the correct framebuffer dimensions in scenarios without a window manager. Thanks to Raphael for the patch. --- repos/ports/src/virtualbox6/main.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/repos/ports/src/virtualbox6/main.cc b/repos/ports/src/virtualbox6/main.cc index 62fce932ee..169a771792 100644 --- a/repos/ports/src/virtualbox6/main.cc +++ b/repos/ports/src/virtualbox6/main.cc @@ -365,7 +365,15 @@ struct Main : Event_handler ievent_source->RegisterListener(listener, ComSafeArrayAsInParam(event_types), true); } - Main(Genode::Env &env) : _env(env) { } + Main(Genode::Env &env) : _env(env) + { + /* + * Explicitly, adapt to current framebuffer/window size after + * initialization finished. This ensures the use of the correct + * framebuffer dimensions in scenarios without a window manager. + */ + _handle_fb_mode(); + } };