[gtk/wip/otte/gleanup: 69/70] gdksurface-win32.c: Create all surfaces with CS_OWNDC




commit ec39de5f7bc0e2d8bd98b40d74fa4006d8e8e077
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 85b52fc297..ee5afa5381 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]