Viewport: Fixed mouse hover flicker on mouse button release frame after moving a window. (#1542)

Platform: Clarifying some comments in back-ends.
This commit is contained in:
omar
2018-04-24 17:09:50 +02:00
parent 679f4882a5
commit e3e4b7bdf5
11 changed files with 38 additions and 22 deletions

View File

@ -3357,7 +3357,11 @@ static void ImGui::UpdateMovingWindow()
{
UpdateTryMergeWindowIntoHostViewport(moving_window, g.MouseRefViewport);
// Clear the NoInput flag set by the Viewport system
// Patch the mouse viewport so that we don't hover under the moved window during the mouse released frame
if (!IsDragDropPayloadBeingAccepted())
g.MouseRefViewport = moving_window->Viewport;
// Clear the NoInput window flag set by the Viewport system
moving_window->Viewport->Flags &= ~ImGuiViewportFlags_NoInputs;
ClearActiveID();