mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-31 21:03:43 +01:00
fix window focus for minimized windows
This commit is contained in:
parent
b763dd5368
commit
22810a1093
2 changed files with 13 additions and 13 deletions
|
|
@ -197,20 +197,20 @@ namespace Dalamud.Interface.Windowing
|
|||
{
|
||||
// Draw the actual window contents
|
||||
this.Draw();
|
||||
}
|
||||
|
||||
this.IsFocused = ImGui.IsWindowFocused(ImGuiFocusedFlags.RootAndChildWindows);
|
||||
this.IsFocused = ImGui.IsWindowFocused(ImGuiFocusedFlags.RootAndChildWindows);
|
||||
|
||||
var escapeDown = Service<KeyState>.Get()[VirtualKey.ESCAPE];
|
||||
var isAllowed = Service<DalamudConfiguration>.Get().IsFocusManagementEnabled;
|
||||
if (escapeDown && this.IsFocused && isAllowed && !wasEscPressedLastFrame && this.RespectCloseHotkey)
|
||||
{
|
||||
this.IsOpen = false;
|
||||
wasEscPressedLastFrame = true;
|
||||
}
|
||||
else if (!escapeDown && wasEscPressedLastFrame)
|
||||
{
|
||||
wasEscPressedLastFrame = false;
|
||||
}
|
||||
var escapeDown = Service<KeyState>.Get()[VirtualKey.ESCAPE];
|
||||
var isAllowed = Service<DalamudConfiguration>.Get().IsFocusManagementEnabled;
|
||||
if (escapeDown && this.IsFocused && isAllowed && !wasEscPressedLastFrame && this.RespectCloseHotkey)
|
||||
{
|
||||
this.IsOpen = false;
|
||||
wasEscPressedLastFrame = true;
|
||||
}
|
||||
else if (!escapeDown && wasEscPressedLastFrame)
|
||||
{
|
||||
wasEscPressedLastFrame = false;
|
||||
}
|
||||
|
||||
ImGui.End();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue