From ffcb6e2f6fa9be6afc68d874588f2c17be0b82cb Mon Sep 17 00:00:00 2001 From: GovanifY Date: Thu, 20 Feb 2025 23:03:27 +0100 Subject: [PATCH] QT/MainWindow: disable native window rendering in wayland This is a workaround for QTBUG-133919 --- pcsx2-qt/MainWindow.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pcsx2-qt/MainWindow.cpp b/pcsx2-qt/MainWindow.cpp index 84729db973..c92092006c 100644 --- a/pcsx2-qt/MainWindow.cpp +++ b/pcsx2-qt/MainWindow.cpp @@ -104,6 +104,15 @@ MainWindow::MainWindow() pxAssert(!g_main_window); g_main_window = this; + // Native window rendering is broken in wayland. + // Let's work around it by disabling it for every widget besides + // DisplayWidget. + // Additionally, alien widget rendering is much more performant, so we + // should have a nice responsiveness boost in our UI :) + // QTBUG-133919, reported upstream by govanify + QGuiApplication::setAttribute(Qt::AA_NativeWindows, false); + QGuiApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings, true); + #if !defined(_WIN32) && !defined(__APPLE__) s_use_central_widget = DisplayContainer::isRunningOnWayland(); #endif