mirror of
https://github.com/glfw/glfw.git
synced 2025-02-19 23:20:35 +00:00
Win32: set mouse button released after drag/resize
When calling the drag/resize operation GLFW would keep the left mouse button pressed even after drag/resize was completed. The other changes will hopefully make the build compile for other platforms.
This commit is contained in:
parent
56e8df2f96
commit
b21eed2ad4
@ -121,7 +121,6 @@ information on what to include when reporting a bug.
|
||||
|
||||
## Changelog
|
||||
|
||||
User-visible changes since the last release.
|
||||
- Added `GLFW_PLATFORM` init hint for runtime platform selection (#1958)
|
||||
- Added `GLFW_ANY_PLATFORM`, `GLFW_PLATFORM_WIN32`, `GLFW_PLATFORM_COCOA`,
|
||||
`GLFW_PLATFORM_WAYLAND`, `GLFW_PLATFORM_X11` and `GLFW_PLATFORM_NULL` symbols to
|
||||
@ -402,6 +401,7 @@ User-visible changes since the last release.
|
||||
- [GLX] Added loading of glvnd `libGLX.so.0` where available
|
||||
- [GLX] Bugfix: Context creation failed if GLX 1.4 was not exported by GLX library
|
||||
|
||||
|
||||
## Contact
|
||||
|
||||
On [glfw.org](https://www.glfw.org/) you can find the latest version of GLFW, as
|
||||
|
@ -1779,6 +1779,9 @@ void _glfwPlatformDragWindow(_GLFWwindow* window)
|
||||
{
|
||||
ReleaseCapture();
|
||||
SendMessage(window->win32.handle, WM_NCLBUTTONDOWN, HTCAPTION, 0);
|
||||
|
||||
// Mouse button will be released after drag, so prepare released state here already
|
||||
_glfwInputMouseClick(window, GLFW_MOUSE_BUTTON_1, GLFW_RELEASE, 0);
|
||||
}
|
||||
|
||||
void _glfwPlatformResizeWindow(_GLFWwindow* window, int border)
|
||||
@ -1815,6 +1818,9 @@ void _glfwPlatformResizeWindow(_GLFWwindow* window, int border)
|
||||
}
|
||||
ReleaseCapture();
|
||||
SendMessage(window->win32.handle, WM_NCLBUTTONDOWN, wBorder, 0);
|
||||
|
||||
// Mouse button will be released after drag, so prepare released state here already
|
||||
_glfwInputMouseClick(window, GLFW_MOUSE_BUTTON_1, GLFW_RELEASE, 0);
|
||||
}
|
||||
|
||||
void _glfwSetWindowMonitorWin32(_GLFWwindow* window,
|
||||
|
@ -2100,7 +2100,7 @@ void _glfwFocusWindowWayland(_GLFWwindow* window)
|
||||
|
||||
void _glfwPlatformDragWindow(_GLFWwindow* window)
|
||||
{
|
||||
wl_shell_surface_move(window->wl.surface, _glfw.wl.seat, _glfw.wl.serial);
|
||||
xdg_toplevel_move(window->wl.xdg.toplevel, _glfw.wl.seat, _glfw.wl.serial);
|
||||
}
|
||||
|
||||
void _glfwPlatformResizeWindow(_GLFWwindow* window, int border)
|
||||
@ -2135,10 +2135,10 @@ void _glfwPlatformResizeWindow(_GLFWwindow* window, int border)
|
||||
default:
|
||||
assert(GLFW_FALSE);
|
||||
}
|
||||
wl_shell_surface_resize(window->wl.surface,
|
||||
_glfw.wl.seat,
|
||||
_glfw.wl.serial,
|
||||
wlBorder);
|
||||
xdg_toplevel_resize(window->wl.xdg.toplevel,
|
||||
_glfw.wl.seat,
|
||||
_glfw.wl.serial,
|
||||
wlBorder);
|
||||
}
|
||||
|
||||
void _glfwSetWindowMonitorWayland(_GLFWwindow* window,
|
||||
|
Loading…
Reference in New Issue
Block a user