diff --git a/CHANGES b/CHANGES index d5c6b6739..43079ec3d 100644 --- a/CHANGES +++ b/CHANGES @@ -19,6 +19,7 @@ Other fixes: - Qt: Fix crash when applying changes to GB I/O registers in I/O view - Qt: Fix LCDC background priority/enable bit being mis-mapped in I/O view - Qt: Fix saving named states breaking when screenshot states disabled (fixes mgba.io/i/3320) + - Qt: Fix potential crash on Wayland with OpenGL (fixes mgba.io/i/3276) - Updater: Fix updating appimage across filesystems Misc: - Qt: Make window corners square on Windows 11 (fixes mgba.io/i/3285) diff --git a/src/platform/qt/DisplayGL.cpp b/src/platform/qt/DisplayGL.cpp index 67443edc8..3d2e2ff2a 100644 --- a/src/platform/qt/DisplayGL.cpp +++ b/src/platform/qt/DisplayGL.cpp @@ -190,6 +190,8 @@ DisplayGL::DisplayGL(const QSurfaceFormat& format, QWidget* parent) { setAttribute(Qt::WA_NativeWindow); window()->windowHandle()->setFormat(format); + windowHandle()->setSurfaceType(QSurface::OpenGLSurface); + windowHandle()->destroy(); windowHandle()->create(); #ifdef USE_SHARE_WIDGET