imgui icon indicating copy to clipboard operation
imgui copied to clipboard

Update MouseViewport on the same frame as AddMouseViewportEvent is processed

Open cfillion opened this issue 1 year ago • 0 comments

Version: 1.88 (issue bisected to e278277d53c961b6b345388b79644187bd0d0339, v1.87) Branch: docking Backends: imgui_impl_win32.cpp (and custom)

My Issue:

IsWindowHovered returns true for one frame in the window under the viewport under the mouse when releasing the left mouse button.

This happens only if the backend uses the new io.AddMouseViewportEvent instead of directly setting io.MouseHoveredViewport.

NewFrame calls UpdateViewportsNewFrame before UpdateInputEvents, so there is a one frame delay before the former sees the new io.MouseHoveredViewport set by the latter.

Screenshot/Video

Video

cfillion avatar Oct 30 '22 00:10 cfillion