From a713a8884572bec8dcd02f615f74a9815c219189 Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 17 Nov 2021 11:32:15 -0300 Subject: [PATCH] [x11] Fix initial black window on Linux Possible regression introduced in f15589734f6d4400c79574d7142adce0c2dd53c8 --- src/app/app.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/app.cpp b/src/app/app.cpp index c2403d88c..5a6e31174 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -325,6 +325,11 @@ int App::initialize(const AppOptions& options) // Show the main window (this is not modal, the code continues) m_mainWindow->openWindow(); +#if LAF_LINUX // TODO check why this is required and we cannot call + // updateAllDisplaysWithNewScale() on Linux/X11 + // Redraw the whole screen. + manager->invalidate(); +#else // To know the initial manager size we call to // Manager::updateAllDisplaysWithNewScale(...) so we receive a // Manager::onNewDisplayConfiguration() (which will update the @@ -334,6 +339,7 @@ int App::initialize(const AppOptions& options) // the dialog is centered correctly to the manager bounds. const int scale = Preferences::instance().general.screenScale(); manager->updateAllDisplaysWithNewScale(scale); +#endif } #endif // ENABLE_UI