parent
25d8c1af91
commit
fbbe7fee53
@ -3160,6 +3160,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
|
|||||||
// When reusing window again multiple times a frame, just append content (don't need to setup again)
|
// When reusing window again multiple times a frame, just append content (don't need to setup again)
|
||||||
const int current_frame = ImGui::GetFrameCount();
|
const int current_frame = ImGui::GetFrameCount();
|
||||||
const bool first_begin_of_the_frame = (window->LastFrameDrawn != current_frame);
|
const bool first_begin_of_the_frame = (window->LastFrameDrawn != current_frame);
|
||||||
|
const bool window_was_visible = (window->LastFrameDrawn == current_frame - 1);
|
||||||
if (first_begin_of_the_frame)
|
if (first_begin_of_the_frame)
|
||||||
{
|
{
|
||||||
window->Active = true;
|
window->Active = true;
|
||||||
@ -3179,7 +3180,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
|
|||||||
if (first_begin_of_the_frame)
|
if (first_begin_of_the_frame)
|
||||||
{
|
{
|
||||||
// New windows appears in front
|
// New windows appears in front
|
||||||
if (!window->WasActive)
|
if (!window_was_visible)
|
||||||
{
|
{
|
||||||
window->AutoPosLastDirection = -1;
|
window->AutoPosLastDirection = -1;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user