diff --git a/Dalamud/Interface/Windowing/Window.cs b/Dalamud/Interface/Windowing/Window.cs index ec9115d8d..b506ffcb1 100644 --- a/Dalamud/Interface/Windowing/Window.cs +++ b/Dalamud/Interface/Windowing/Window.cs @@ -48,6 +48,11 @@ namespace Dalamud.Interface.Windowing /// public bool IsFocused { get; private set; } + /// + /// Allow this window to be closed with a hotkey, like Escape, and keep game addons open in turn if it is closed. + /// + public bool RespectCloseHotkey { get; set; } = true; + /// /// Gets or sets the position of this window. /// @@ -196,7 +201,7 @@ namespace Dalamud.Interface.Windowing this.IsFocused = ImGui.IsWindowFocused(); var escapeDown = Service.Get()[VirtualKey.ESCAPE]; - if (escapeDown && this.IsFocused && !wasEscPressedLastFrame) + if (escapeDown && this.IsFocused && !wasEscPressedLastFrame && this.RespectCloseHotkey) { this.IsOpen = false; wasEscPressedLastFrame = true;