Skip to content

Commit

Permalink
Popup: Fixed popup initial frame reading MousePos again instead of th…
Browse files Browse the repository at this point in the history
…e value already stored within the CurrentPopupStack in the previous frame. Doesn't make a big difference here, but will do as gamepad/keyboard navigation will set its own popup position. (#323)
  • Loading branch information
ocornut committed Jul 18, 2016
1 parent 91e1c56 commit 6f7da2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3937,7 +3937,7 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
// Popup first latch mouse position, will position itself when it appears next frame
window->AutoPosLastDirection = -1;
if ((flags & ImGuiWindowFlags_Popup) != 0 && !window_pos_set_by_api)
window->PosFloat = g.IO.MousePos;
window->PosFloat = g.CurrentPopupStack.back().MousePosOnOpen;
}

// Collapse window by double-clicking on title bar
Expand Down

0 comments on commit 6f7da2f

Please sign in to comment.