From 49a76257cd832cf845eecf152fb374747b44626d Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Mon, 19 Jul 2021 10:44:48 +0800 Subject: [PATCH] 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. --- gdk/win32/gdksurface-win32.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c index bca73c6edb..63c542a14a 100644 --- a/gdk/win32/gdksurface-win32.c +++ b/gdk/win32/gdksurface-win32.c @@ -397,12 +397,13 @@ RegisterGdkClass (GdkSurfaceType wtype) wcl.hbrBackground = NULL; \ wcl.hCursor = LoadCursor (NULL, IDC_ARROW); + /* MSDN: CS_OWNDC is needed for OpenGL contexts */ + wcl.style |= CS_OWNDC; + switch (wtype) { case GDK_SURFACE_TOPLEVEL: case GDK_SURFACE_POPUP: - /* MSDN: CS_OWNDC is needed for OpenGL contexts */ - wcl.style |= CS_OWNDC; if (0 == klassTOPLEVEL) { wcl.lpszClassName = L"gdkSurfaceToplevel";