From 126e9a7b7097421972c5d73c4c95eab03644d537 Mon Sep 17 00:00:00 2001 From: Felipe Ferreira da Silva Date: Thu, 6 Apr 2017 11:11:30 -0300 Subject: [PATCH] Add implementation of glfwDragWindow for Windows The last parameter of ```SendMessage``` is set to 0, but possibly should be the cursor coordinates. Tests are required to know if it is the position of the cursor relative to the screen or to the specified window. --- src/null_window.c | 4 ++++ src/win32_window.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/src/null_window.c b/src/null_window.c index 7f0101d44..3ca26f292 100644 --- a/src/null_window.c +++ b/src/null_window.c @@ -184,6 +184,10 @@ void _glfwPlatformFocusWindow(_GLFWwindow* window) { } +void _glfwPlatformDragWindow(_GLFWwindow* window) +{ +} + int _glfwPlatformWindowFocused(_GLFWwindow* window) { return GLFW_FALSE; diff --git a/src/win32_window.c b/src/win32_window.c index 363ef0f32..487376979 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -1323,6 +1323,12 @@ void _glfwPlatformFocusWindow(_GLFWwindow* window) SetFocus(window->win32.handle); } +void _glfwPlatformDragWindow(_GLFWwindow* window) +{ + ReleaseCapture(); + SendMessage(window->win32.handle, WM_NCLBUTTONDOWN, HTCAPTION, 0); +} + void _glfwPlatformSetWindowMonitor(_GLFWwindow* window, _GLFWmonitor* monitor, int xpos, int ypos,