From 8401488ec51cb52e6c648ea4a9372a5e77f9f2fa Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Wed, 1 Sep 2021 20:44:45 +0200 Subject: [PATCH] fix: don't consider child windows when checking Window focus --- Dalamud/Interface/Windowing/Window.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dalamud/Interface/Windowing/Window.cs b/Dalamud/Interface/Windowing/Window.cs index 713e91444..65522397b 100644 --- a/Dalamud/Interface/Windowing/Window.cs +++ b/Dalamud/Interface/Windowing/Window.cs @@ -2,6 +2,7 @@ using System.Numerics; using Dalamud.Game.ClientState.Keys; using ImGuiNET; +using Serilog; namespace Dalamud.Interface.Windowing { @@ -201,7 +202,7 @@ namespace Dalamud.Interface.Windowing // Draw the actual window contents this.Draw(); - this.IsFocused = ImGui.IsWindowFocused(); + this.IsFocused = ImGui.IsWindowFocused(ImGuiFocusedFlags.RootAndChildWindows); var escapeDown = Service.Get()[VirtualKey.ESCAPE]; if (escapeDown && this.IsFocused && !wasEscPressedLastFrame && this.RespectCloseHotkey)