You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the docking branch, after closing a modal dialog, the hovered window state is no longer cleared when moving the mouse from within the app to outside the app.
The expected behavior would be that the hovered window state is cleared.
See video for steps to reproduce, .e.g.
Open a modal dialog
Close it
Hover over a window (HoveredWindow is set correctly)
Move from the window to a location outside of the application (HoveredWindow is incorrectly still set)
I noticed normally, when moving the mouse outside the application generates both a MouseViewport (0x00000000) and a MousePos(-FLT_MAX, -FLT_MAX). After opening and closing the modal, only a MouseViewport (0x00000000) is generated when moving outside the application.
As a workaround I'm currently calling ImGui::GetIO().AddMousePosEvent(-FLT_MIN, -FLT_MIN); after closing a modal dialog.
Screenshots/Video:
hovered_window.mp4
Minimal, Complete and Verifiable Example code:
Unmodified demo window.
The text was updated successfully, but these errors were encountered:
ocornut
changed the title
HoveredWindow state is no longer cleared after closing a modal
HoveredWindow state is no longer cleared after closing a secondary viewport
Sep 16, 2024
Thank you for reporting!
I investigated it and understood it wasn't specifically linked to modal.
Rather, the issue was that if a window disappear while being tracked, it can leave a tracking request and mess with mouse updates for other windows.
I have pushed a fix 8ba7efb
Although this technically only affects multi-viewports I have also merged the fix in the main branch.
…king would hog mouse tracking and temporary lead to incorrect update of HoveredWindow. (#7971)
# Conflicts:
# backends/imgui_impl_win32.cpp
# docs/CHANGELOG.txt
Version/Branch of Dear ImGui:
version 1.91.0 (19100), docking branch
Back-ends:
imgui_impl_win32.cpp + imgui_impl_dx12.cpp
Compiler, OS:
Windows 10 + MSVC 14.39.33218
Full config/build information:
Details:
In the docking branch, after closing a modal dialog, the hovered window state is no longer cleared when moving the mouse from within the app to outside the app.
The expected behavior would be that the hovered window state is cleared.
See video for steps to reproduce, .e.g.
I noticed normally, when moving the mouse outside the application generates both a
MouseViewport (0x00000000)
and aMousePos(-FLT_MAX, -FLT_MAX)
. After opening and closing the modal, only aMouseViewport (0x00000000)
is generated when moving outside the application.As a workaround I'm currently calling
ImGui::GetIO().AddMousePosEvent(-FLT_MIN, -FLT_MIN);
after closing a modal dialog.Screenshots/Video:
hovered_window.mp4
Minimal, Complete and Verifiable Example code:
Unmodified demo window.
The text was updated successfully, but these errors were encountered: