mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-31 21:03:43 +01:00
fix: don't consider child windows when checking Window focus
This commit is contained in:
parent
3e9c1f8d53
commit
8401488ec5
1 changed files with 2 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ using System.Numerics;
|
||||||
|
|
||||||
using Dalamud.Game.ClientState.Keys;
|
using Dalamud.Game.ClientState.Keys;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
|
using Serilog;
|
||||||
|
|
||||||
namespace Dalamud.Interface.Windowing
|
namespace Dalamud.Interface.Windowing
|
||||||
{
|
{
|
||||||
|
|
@ -201,7 +202,7 @@ namespace Dalamud.Interface.Windowing
|
||||||
// Draw the actual window contents
|
// Draw the actual window contents
|
||||||
this.Draw();
|
this.Draw();
|
||||||
|
|
||||||
this.IsFocused = ImGui.IsWindowFocused();
|
this.IsFocused = ImGui.IsWindowFocused(ImGuiFocusedFlags.RootAndChildWindows);
|
||||||
|
|
||||||
var escapeDown = Service<KeyState>.Get()[VirtualKey.ESCAPE];
|
var escapeDown = Service<KeyState>.Get()[VirtualKey.ESCAPE];
|
||||||
if (escapeDown && this.IsFocused && !wasEscPressedLastFrame && this.RespectCloseHotkey)
|
if (escapeDown && this.IsFocused && !wasEscPressedLastFrame && this.RespectCloseHotkey)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue