mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-15 03:30:07 +00:00
RenderWidget: Set WA_DontCreateNativeAncestors
Some windowing systems like wayland are designed to show hardware accellerated surfaces as subsurfaces and not native windows.
This commit is contained in:
parent
041252ba36
commit
3846d0c2cd
@ -41,6 +41,8 @@
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
#endif
|
||||
|
||||
static Frontend::WindowSystemType GetWindowSystemType();
|
||||
|
||||
EmuThread::EmuThread(Frontend::GraphicsContext& core_context) : core_context(core_context) {}
|
||||
|
||||
EmuThread::~EmuThread() = default;
|
||||
@ -243,6 +245,9 @@ public:
|
||||
: RenderWidget(parent), is_secondary(is_secondary) {
|
||||
setAttribute(Qt::WA_NativeWindow);
|
||||
setAttribute(Qt::WA_PaintOnScreen);
|
||||
if (GetWindowSystemType() == Frontend::WindowSystemType::Wayland) {
|
||||
setAttribute(Qt::WA_DontCreateNativeAncestors);
|
||||
}
|
||||
windowHandle()->setSurfaceType(QWindow::OpenGLSurface);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user