From 45672d43e3a88b735dffab36e4e503b76055e59d Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 17 Dec 2022 10:19:18 -0500 Subject: qt: avoid setting WA_DontCreateNativeAncestors on all platforms --- src/yuzu/bootmanager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index 642f96690..7147c6aaa 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -44,6 +44,8 @@ #include "yuzu/bootmanager.h" #include "yuzu/main.h" +static Core::Frontend::WindowSystemType GetWindowSystemType(); + EmuThread::EmuThread(Core::System& system_) : system{system_} {} EmuThread::~EmuThread() = default; @@ -228,8 +230,10 @@ class RenderWidget : public QWidget { public: explicit RenderWidget(GRenderWindow* parent) : QWidget(parent), render_window(parent) { setAttribute(Qt::WA_NativeWindow); - setAttribute(Qt::WA_DontCreateNativeAncestors); setAttribute(Qt::WA_PaintOnScreen); + if (GetWindowSystemType() == Core::Frontend::WindowSystemType::Wayland) { + setAttribute(Qt::WA_DontCreateNativeAncestors); + } } virtual ~RenderWidget() = default; -- cgit v1.2.3