diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 0cc5f55356..9acf1dd151 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -1918,18 +1918,13 @@ void MainWindow::startSplasher() GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("General"); // first search for an external image file if (hGrp->GetBool("ShowSplasher", true)) { - const auto isWayland = qGuiApp->platformName() == QLatin1String("wayland"); - const auto flags = isWayland ? Qt::WindowFlags() : Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint; - d->splashscreen = new SplashScreen(this->splashImage(), flags); + d->splashscreen = new SplashScreen(this->splashImage()); if (!hGrp->GetBool("ShowSplasherMessages", false)) { d->splashscreen->setShowMessages(false); } d->splashscreen->show(); - if (!isWayland) { - QApplication::processEvents(); - } } else { d->splashscreen = nullptr; @@ -1939,24 +1934,11 @@ void MainWindow::startSplasher() void MainWindow::stopSplasher() { - const auto isWayland = qGuiApp->platformName() == QLatin1String("wayland"); - if (isWayland) { - if (d->splashscreen) { - d->splashscreen->finish(this); - d->splashscreen->deleteLater(); - d->splashscreen = nullptr; - } - return; + if (d->splashscreen) { + d->splashscreen->finish(this); + delete d->splashscreen; + d->splashscreen = nullptr; } - - QApplication::processEvents(); - QTimer::singleShot(3000, this, [this]() { - if (d->splashscreen) { - d->splashscreen->finish(this); - d->splashscreen->deleteLater(); - d->splashscreen = nullptr; - } - }); } QPixmap MainWindow::aboutImage() const diff --git a/src/Gui/StartupProcess.cpp b/src/Gui/StartupProcess.cpp index b91b0d7e1e..65f46e9b07 100644 --- a/src/Gui/StartupProcess.cpp +++ b/src/Gui/StartupProcess.cpp @@ -212,7 +212,6 @@ void StartupPostProcess::setLoadFromPythonModule(bool value) void StartupPostProcess::execute() { - showSplashScreen(); setWindowTitle(); setProcessMessages(); setAutoSaving(); @@ -421,7 +420,7 @@ bool StartupPostProcess::hiddenMainWindow() const return hidden; } -void StartupPostProcess::showSplashScreen() +void StartupPostProcess::showMainWindow() { bool hidden = hiddenMainWindow(); @@ -429,10 +428,7 @@ void StartupPostProcess::showSplashScreen() if (!hidden && !loadFromPythonModule) { mainWindow->startSplasher(); } -} -void StartupPostProcess::showMainWindow() -{ // running the GUI init script try { Base::Console().Log("Run Gui init script\n"); diff --git a/src/Gui/StartupProcess.h b/src/Gui/StartupProcess.h index eb9b007c71..75a2c3a824 100644 --- a/src/Gui/StartupProcess.h +++ b/src/Gui/StartupProcess.h @@ -74,7 +74,6 @@ private: void setImportImageFormats(); bool hiddenMainWindow() const; void showMainWindow(); - void showSplashScreen(); void activateWorkbench(); void checkParameters();