feat: consider all WindowSystems globally

This commit is contained in:
goat 2021-09-01 20:44:21 +02:00
parent f6a68bac6e
commit 3e9c1f8d53
No known key found for this signature in database
GPG key ID: F18F057873895461
3 changed files with 16 additions and 5 deletions

View file

@ -6,6 +6,7 @@ using CheapLoc;
using Dalamud.Configuration.Internal;
using Dalamud.Hooking;
using Dalamud.Interface.Internal;
using Dalamud.Interface.Windowing;
using FFXIVClientStructs.FFXIV.Component.GUI;
using Serilog;
@ -75,10 +76,8 @@ namespace Dalamud.Game.Internal
private IntPtr AtkUnitBaseReceiveGlobalEventDetour(AtkUnitBase* thisPtr, ushort cmd, uint a3, IntPtr a4, uint* a5)
{
var di = Service<DalamudInterface>.Get();
// "Close Addon"
if (cmd == 12 && di.WindowSystem.HasAnyFocus)
if (cmd == 12 && WindowSystem.HasAnyWindowSystemFocus)
return IntPtr.Zero;
return this.hookAtkUnitBaseReceiveGlobalEvent.Original(thisPtr, cmd, a3, a4, a5);