fix: macOS flicker when menu is first clicked if the app is set to autohide on startup

fixes: #9523
This commit is contained in:
sithlord48
2026-02-26 22:41:58 -05:00
committed by Nick Bolton
parent 814d63af28
commit fc1f3b0142

View File

@ -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