From 838c4e938cffb74cb36c47fe2107809ef97f3647 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 14 Sep 2016 13:05:13 +0200 Subject: [PATCH] Win32: Allow iconifying undecorated windows Fixes #861. --- README.md | 1 + src/win32_window.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b6eae75..ad48a686 100644 --- a/README.md +++ b/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 diff --git a/src/win32_window.c b/src/win32_window.c index e0bcb1c2..ed67780e 100644 --- a/src/win32_window.c +++ b/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;