From b366db9cae1988119a06e63e2c1a8838d5d8f71f Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Tue, 12 Mar 2024 13:03:47 +0100 Subject: [PATCH] Updates --- AutoShutdown/Plogon.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/AutoShutdown/Plogon.cs b/AutoShutdown/Plogon.cs index 76162f9..23189a6 100644 --- a/AutoShutdown/Plogon.cs +++ b/AutoShutdown/Plogon.cs @@ -5,6 +5,7 @@ using AutoRetainerAPI; using Dalamud.Plugin; using Dalamud.Plugin.Services; using ECommons; +using FFXIVClientStructs.FFXIV.Client.System.Framework; using LLib; namespace AutoShutdown; @@ -58,7 +59,11 @@ public sealed class Plogon : IDalamudPlugin } // move to background using alt+esc - SendKeys.SendWait("%({esc})"); + unsafe + { + if (!Framework.Instance()->WindowInactive) + SendKeys.SendWait("%({esc})"); + } } public void Dispose()