winapi cursor state improvements

This commit is contained in:
Turánszki János
2025-03-30 12:35:31 +02:00
parent 29fe3b7558
commit 4235e2c6e5
3 changed files with 27 additions and 0 deletions
+19
View File
@@ -303,6 +303,25 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_SETCURSOR:
switch (LOWORD(lParam))
{
case HTBOTTOM:
case HTBOTTOMLEFT:
case HTBOTTOMRIGHT:
case HTLEFT:
case HTRIGHT:
case HTTOP:
case HTTOPLEFT:
case HTTOPRIGHT:
// allow the system to handle these window resize cursors:
return DefWindowProc(hWnd, message, wParam, lParam);
default:
// notify the engine at other cursor changes to set its own cursor instead
wi::input::NotifyCursorChanged();
break;
}
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}