From 2bf75039ee6dce36f496879aa7a3811226b3e0f2 Mon Sep 17 00:00:00 2001 From: Philippe Groarke Date: Sat, 29 Jun 2019 13:15:33 -0400 Subject: [PATCH] win32_window : Respect floating. --- .gitignore | 1 + src/win32_window.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 96d5ba3f6..9d6d4c09c 100644 --- a/.gitignore +++ b/.gitignore @@ -83,3 +83,4 @@ tests/title tests/triangle-vulkan tests/windows +/[Bb]uild*/ diff --git a/src/win32_window.c b/src/win32_window.c index 24966bf41..a48697d89 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -1741,8 +1741,13 @@ void _glfwPlatformSetWindowMonitor(_GLFWwindow* window, acquireMonitor(window); + HWND z_mode = HWND_TOP; + if (window->floating) { + z_mode = HWND_TOPMOST; + } + GetMonitorInfo(window->monitor->win32.handle, &mi); - SetWindowPos(window->win32.handle, HWND_TOPMOST, + SetWindowPos(window->win32.handle, z_mode, mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right - mi.rcMonitor.left,