gdksurface-win32.c: Create all surfaces with CS_OWNDC

We want to ensure that we have things set up properly for drag surfaces
as well.
This commit is contained in:
Chun-wei Fan 2021-07-19 10:44:48 +08:00
parent 77829cf3ed
commit 49a76257cd

View File

@ -397,12 +397,13 @@ RegisterGdkClass (GdkSurfaceType wtype)
wcl.hbrBackground = NULL; \ wcl.hbrBackground = NULL; \
wcl.hCursor = LoadCursor (NULL, IDC_ARROW); wcl.hCursor = LoadCursor (NULL, IDC_ARROW);
/* MSDN: CS_OWNDC is needed for OpenGL contexts */
wcl.style |= CS_OWNDC;
switch (wtype) switch (wtype)
{ {
case GDK_SURFACE_TOPLEVEL: case GDK_SURFACE_TOPLEVEL:
case GDK_SURFACE_POPUP: case GDK_SURFACE_POPUP:
/* MSDN: CS_OWNDC is needed for OpenGL contexts */
wcl.style |= CS_OWNDC;
if (0 == klassTOPLEVEL) if (0 == klassTOPLEVEL)
{ {
wcl.lpszClassName = L"gdkSurfaceToplevel"; wcl.lpszClassName = L"gdkSurfaceToplevel";