A simple change that uses TrackMouseEvent to determine if the cursor has left the window. Uses WM_MOUSEMOVE to determine if the mouse has entered back into the window. Adds additional state mouse_in_window to the WindowState struct to determine if the cursor is over the window. This is initialized to true since TrackMouseEvent will immediately register a WM_MOUSELEAVE message if the cursor is not in the window.
Mostly adding this since it's useful for me so it may be useful for others.
A simple change that uses TrackMouseEvent to determine if the cursor has left the window. Uses WM_MOUSEMOVE to determine if the mouse has entered back into the window. Adds additional state
mouse_in_window
to theWindowState
struct to determine if the cursor is over the window. This is initialized to true since TrackMouseEvent will immediately register a WM_MOUSELEAVE message if the cursor is not in the window.Mostly adding this since it's useful for me so it may be useful for others.