[gtk/win32.hidpi.cleanup: 1/2] gdksurface-win32.c: Create all surfaces with CS_OWNDC




commit 49a76257cd832cf845eecf152fb374747b44626d
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Jul 19 10:44:48 2021 +0800

    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";


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]