mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 20:28:49 -05:00
Win32: Fix non-client actions for disabled cursor
Disabled cursor mode interfered with some non-client actions.
This commit is contained in:
parent
267e06a41e
commit
d0c3fa900a
|
@ -631,13 +631,9 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
||||||
// clicking a caption button
|
// clicking a caption button
|
||||||
if (HIWORD(lParam) == WM_LBUTTONDOWN)
|
if (HIWORD(lParam) == WM_LBUTTONDOWN)
|
||||||
{
|
{
|
||||||
if (LOWORD(lParam) == HTCLOSE ||
|
if (LOWORD(lParam) != HTCLIENT)
|
||||||
LOWORD(lParam) == HTMINBUTTON ||
|
|
||||||
LOWORD(lParam) == HTMAXBUTTON)
|
|
||||||
{
|
|
||||||
window->win32.frameAction = GLFW_TRUE;
|
window->win32.frameAction = GLFW_TRUE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -943,6 +939,9 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
||||||
case WM_ENTERSIZEMOVE:
|
case WM_ENTERSIZEMOVE:
|
||||||
case WM_ENTERMENULOOP:
|
case WM_ENTERMENULOOP:
|
||||||
{
|
{
|
||||||
|
if (window->win32.frameAction)
|
||||||
|
break;
|
||||||
|
|
||||||
// HACK: Enable the cursor while the user is moving or
|
// HACK: Enable the cursor while the user is moving or
|
||||||
// resizing the window or using the window menu
|
// resizing the window or using the window menu
|
||||||
if (window->cursorMode == GLFW_CURSOR_DISABLED)
|
if (window->cursorMode == GLFW_CURSOR_DISABLED)
|
||||||
|
@ -954,6 +953,9 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
||||||
case WM_EXITSIZEMOVE:
|
case WM_EXITSIZEMOVE:
|
||||||
case WM_EXITMENULOOP:
|
case WM_EXITMENULOOP:
|
||||||
{
|
{
|
||||||
|
if (window->win32.frameAction)
|
||||||
|
break;
|
||||||
|
|
||||||
// HACK: Disable the cursor once the user is done moving or
|
// HACK: Disable the cursor once the user is done moving or
|
||||||
// resizing the window or using the menu
|
// resizing the window or using the menu
|
||||||
if (window->cursorMode == GLFW_CURSOR_DISABLED)
|
if (window->cursorMode == GLFW_CURSOR_DISABLED)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user