os_gfx -> report mouse move events; still allow passive mouse interaction if window is unfocused, but have recently received mousemove events

This commit is contained in:
Ryan Fleury
2024-02-03 18:04:21 -08:00
parent 985a6f37e9
commit 0be4680ec9
7 changed files with 29 additions and 5 deletions
+1
View File
@@ -40,6 +40,7 @@ typedef enum OS_EventKind
OS_EventKind_Null,
OS_EventKind_Press,
OS_EventKind_Release,
OS_EventKind_MouseMove,
OS_EventKind_Text,
OS_EventKind_Scroll,
OS_EventKind_WindowLoseFocus,
+7
View File
@@ -429,6 +429,13 @@ w32_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
}break;
case WM_MOUSEMOVE:
{
OS_Event *event = w32_push_event(OS_EventKind_MouseMove, window);
event->pos.x = (F32)LOWORD(lParam);
event->pos.y = (F32)HIWORD(lParam);
}break;
case WM_MOUSEWHEEL:
{
S16 wheel_delta = HIWORD(wParam);