diff --git a/addons/imgui-godot/ImGuiGodot/ImGuiLayer.cs b/addons/imgui-godot/ImGuiGodot/ImGuiLayer.cs index 0405520..3152c60 100644 --- a/addons/imgui-godot/ImGuiGodot/ImGuiLayer.cs +++ b/addons/imgui-godot/ImGuiGodot/ImGuiLayer.cs @@ -129,12 +129,6 @@ private void OnChangeVisibility() if (Visible) { ProcessMode = ProcessModeEnum.Always; - // TODO: fix position with multiple monitors - //foreach (Node child in GetChildren()) - //{ - // if (child is Window w) - // w.Show(); - //} } else { @@ -142,14 +136,16 @@ private void OnChangeVisibility() Internal.State.Instance.Renderer.OnHide(); _subViewportSize = Vector2I.Zero; RenderingServer.CanvasItemClear(_ci); - //foreach (Node child in GetChildren()) - //{ - // if (child is Window w) - // w.Hide(); - //} + CallDeferred(MethodName.FinishHide); } } + private static void FinishHide() + { + ImGui.NewFrame(); + ImGuiGD.Render(); + } + public override void _Process(double delta) { var winSize = _window.Size;