mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Child window don't take focus when they first appear (focus left to parent)
This commit is contained in:
parent
0911526424
commit
e2734d23ef
@ -2807,6 +2807,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size, float bg
|
|||||||
window->Visible = true;
|
window->Visible = true;
|
||||||
|
|
||||||
// New windows appears in front
|
// New windows appears in front
|
||||||
|
if (!(flags & ImGuiWindowFlags_ChildWindow))
|
||||||
if (window->LastFrameDrawn < current_frame - 1)
|
if (window->LastFrameDrawn < current_frame - 1)
|
||||||
FocusWindow(window);
|
FocusWindow(window);
|
||||||
|
|
||||||
@ -8583,7 +8584,7 @@ void ImGui::ShowTestWindow(bool* opened)
|
|||||||
ImGui::Text("ImGui says hello.");
|
ImGui::Text("ImGui says hello.");
|
||||||
//ImGui::Text("MousePos (%g, %g)", ImGui::GetIO().MousePos.x, ImGui::GetIO().MousePos.y);
|
//ImGui::Text("MousePos (%g, %g)", ImGui::GetIO().MousePos.x, ImGui::GetIO().MousePos.y);
|
||||||
//ImGui::Text("MouseWheel %d", ImGui::GetIO().MouseWheel);
|
//ImGui::Text("MouseWheel %d", ImGui::GetIO().MouseWheel);
|
||||||
ImGui::Text("KeyMods %s%s%s", ImGui::GetIO().KeyCtrl ? "CTRL" : "", ImGui::GetIO().KeyShift ? "SHIFT" : "", ImGui::GetIO().KeyAlt? "ALT" : "");
|
//ImGui::Text("KeyMods %s%s%s", ImGui::GetIO().KeyCtrl ? "CTRL" : "", ImGui::GetIO().KeyShift ? "SHIFT" : "", ImGui::GetIO().KeyAlt? "ALT" : "");
|
||||||
//ImGui::Text("WantCaptureMouse: %d", ImGui::GetIO().WantCaptureMouse);
|
//ImGui::Text("WantCaptureMouse: %d", ImGui::GetIO().WantCaptureMouse);
|
||||||
//ImGui::Text("WantCaptureKeyboard: %d", ImGui::GetIO().WantCaptureKeyboard);
|
//ImGui::Text("WantCaptureKeyboard: %d", ImGui::GetIO().WantCaptureKeyboard);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user