Merge pull request #114 from Poliwrath/taskbarflash

This commit is contained in:
goaaats 2020-05-18 14:41:44 +02:00 committed by GitHub
commit 9874817b0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 8 deletions

View file

@ -27,6 +27,8 @@ namespace Dalamud
public Dictionary<int, PreferredRole> PreferredRoleReminders { get; set; }
public bool DutyFinderTaskbarFlash { get; set; } = true;
public string LanguageOverride { get; set; }
public string LastVersion { get; set; }

View file

@ -67,14 +67,16 @@ namespace Dalamud.Game.Network {
contentFinderCondition.Image = 112324;
}
if (!NativeFunctions.ApplicationIsActivated()) {
var flashInfo = new NativeFunctions.FLASHWINFO();
flashInfo.cbSize = (uint)Marshal.SizeOf<NativeFunctions.FLASHWINFO>();
flashInfo.uCount = uint.MaxValue;
flashInfo.dwTimeout = 0;
flashInfo.dwFlags = NativeFunctions.FlashWindow.FLASHW_ALL |
NativeFunctions.FlashWindow.FLASHW_TIMERNOFG;
flashInfo.hwnd = Process.GetCurrentProcess().MainWindowHandle;
if (this.dalamud.Configuration.DutyFinderTaskbarFlash && !NativeFunctions.ApplicationIsActivated()) {
var flashInfo = new NativeFunctions.FLASHWINFO
{
cbSize = (uint)Marshal.SizeOf<NativeFunctions.FLASHWINFO>(),
uCount = uint.MaxValue,
dwTimeout = 0,
dwFlags = NativeFunctions.FlashWindow.FLASHW_ALL |
NativeFunctions.FlashWindow.FLASHW_TIMERNOFG,
hwnd = Process.GetCurrentProcess().MainWindowHandle
};
NativeFunctions.FlashWindowEx(ref flashInfo);
}