GDK/Win32: Fix up OpenGL a bit

Like the recent updates in GTK4, the HWND that we use to obtain the HDC
that we need for OpenGL/GLES operations should really be tied to
GdkWindow, not GdkDisplay, as that is where the Win32 HWND where we
originate from is located, so stop storing the GL HWND in
GdkWin32Display, but just grab them from the GdkWindow that is bound to
the GdkGLContext.

We are more conservative about freeing up GL resources in GTK3, so we
will continue to call ReleaseDC() as we did before.
This commit is contained in:
Chun-wei Fan
2021-07-28 11:19:17 +08:00
parent 998f4f32cc
commit 15817973d7
3 changed files with 9 additions and 8 deletions

View File

@ -84,7 +84,6 @@ struct _GdkWin32Display
/* WGL/OpenGL Items */
guint have_wgl : 1;
guint gl_version;
HWND gl_hwnd;
#ifdef GDK_WIN32_ENABLE_EGL
/* EGL (Angle) Items */