mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-03 01:59:08 +08:00
2f8fe8d3e9
Co-authored-by: Monica <v-liumonica@microsoft.com>
37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
diff --git a/src/unix/glegl.cpp b/src/unix/glegl.cpp
|
|
index 9e1b6b7..7407a9f 100644
|
|
--- a/src/unix/glegl.cpp
|
|
+++ b/src/unix/glegl.cpp
|
|
@@ -43,8 +43,9 @@
|
|
|
|
static const char* TRACE_EGL = "glegl";
|
|
|
|
-#ifdef GDK_WINDOWING_WAYLAND
|
|
-
|
|
+// We can't add a member variable to wxGLCanvasEGL in 3.2 branch, so emulate it
|
|
+// by encoding the corresponding boolean value via the presence of "this"
|
|
+// pointer in the given hash set.
|
|
#include "wx/hashset.h"
|
|
|
|
namespace
|
|
@@ -58,8 +59,6 @@ wxGLCanvasSet gs_alreadySetSwapInterval;
|
|
|
|
} // anonymous namespace
|
|
|
|
-#endif // GDK_WINDOWING_WAYLAND
|
|
-
|
|
// ----------------------------------------------------------------------------
|
|
// wxGLContextAttrs: OpenGL rendering context attributes
|
|
// ----------------------------------------------------------------------------
|
|
@@ -633,9 +632,9 @@ wxGLCanvasEGL::~wxGLCanvasEGL()
|
|
DestroyWaylandSubsurface();
|
|
g_clear_pointer(&m_wlEGLWindow, wl_egl_window_destroy);
|
|
g_clear_pointer(&m_wlSurface, wl_surface_destroy);
|
|
+#endif
|
|
|
|
gs_alreadySetSwapInterval.erase(this);
|
|
-#endif
|
|
}
|
|
|
|
void wxGLCanvasEGL::CreateWaylandSubsurface()
|