瀏覽代碼

Win32: Allow iconifying undecorated windows

Fixes #861.
Camilla Berglund 9 年之前
父節點
當前提交
838c4e938c
共有 2 個文件被更改,包括 4 次插入1 次删除
  1. 1 0
      README.md
  2. 3 1
      src/win32_window.c

+ 1 - 0
README.md

@@ -102,6 +102,7 @@ information on what to include when reporting a bug.
 - Added `glfwGetKeyScancode` function that allows retrieving platform depen-
   dent scancodes for keys (#830)
 - Bugfix: Calling `glfwMaximizeWindow` on a full screen window was not ignored
+- [Win32] Bugfix: Undecorated windows could not be iconified by the user (#861)
 
 
 ## Contact

+ 3 - 1
src/win32_window.c

@@ -46,9 +46,11 @@ static DWORD getWindowStyle(const _GLFWwindow* window)
         style |= WS_POPUP;
     else
     {
+        style |= WS_SYSMENU | WS_MINIMIZEBOX;
+
         if (window->decorated)
         {
-            style |= WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
+            style |= WS_CAPTION;
 
             if (window->resizable)
                 style |= WS_MAXIMIZEBOX | WS_THICKFRAME;