From fc1f3b0142217cc776916275f5c4774ac0a8ec1b Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Thu, 26 Feb 2026 22:41:58 -0500 Subject: [PATCH] fix: macOS flicker when menu is first clicked if the app is set to autohide on startup fixes: #9523 --- src/lib/gui/MainWindow.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/gui/MainWindow.cpp b/src/lib/gui/MainWindow.cpp index 8353f076e..0b98b9e31 100644 --- a/src/lib/gui/MainWindow.cpp +++ b/src/lib/gui/MainWindow.cpp @@ -605,7 +605,13 @@ void MainWindow::serverConnectionConfigureClient(const QString &clientName) void MainWindow::open() { - Settings::value(Settings::Gui::Autohide).toBool() ? hide() : showAndActivate(); + if (!Settings::value(Settings::Gui::Autohide).toBool()) + showAndActivate(); + else if (deskflow::platform::isMac()) + // macOS to call hide after this function ends + QTimer::singleShot(1, this, &MainWindow::hide); + else + hide(); // if a critical error was shown just before the main window (i.e. on app // load), it will be hidden behind the main window. therefore we need to raise