diff --git a/qt/src/EmuCanvasVulkan.cpp b/qt/src/EmuCanvasVulkan.cpp index 8bc279cf..db44f2cf 100644 --- a/qt/src/EmuCanvasVulkan.cpp +++ b/qt/src/EmuCanvasVulkan.cpp @@ -94,11 +94,6 @@ void EmuCanvasVulkan::createContext() if (platform == "wayland") { wayland_surface = std::make_unique(); - if (!main_window->isVisible()) - { - main_window->setVisible(true); - QGuiApplication::processEvents(); - } auto display = (wl_display *)pni->nativeResourceForWindow("display", window); auto surface = (wl_surface *)pni->nativeResourceForWindow("surface", main_window->windowHandle()); wayland_surface->attach(display, surface, { parent->x(), parent->y(), width(), height(), static_cast(devicePixelRatio()) }); diff --git a/qt/src/EmuMainWindow.cpp b/qt/src/EmuMainWindow.cpp index 76570640..11153771 100644 --- a/qt/src/EmuMainWindow.cpp +++ b/qt/src/EmuMainWindow.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -82,6 +83,8 @@ void EmuMainWindow::createCanvas() if (QGuiApplication::platformName() == "wayland" && app->config->display_driver != "qt") { auto central_widget = new QStackedWidget(); + setVisible(true); + QGuiApplication::processEvents(); if (app->config->display_driver == "vulkan") {