Make OpenLink happen from the main thread

This commit is contained in:
Soreepeong 2025-08-07 07:50:45 +09:00
parent ebe184b10c
commit 2fbccb2e95

View file

@ -27,6 +27,8 @@ using Windows.Win32.System.Memory;
using Windows.Win32.System.Ole; using Windows.Win32.System.Ole;
using Windows.Win32.UI.WindowsAndMessaging; using Windows.Win32.UI.WindowsAndMessaging;
using Dalamud.Interface.Internal;
using FLASHWINFO = Windows.Win32.UI.WindowsAndMessaging.FLASHWINFO; using FLASHWINFO = Windows.Win32.UI.WindowsAndMessaging.FLASHWINFO;
using HWND = Windows.Win32.Foundation.HWND; using HWND = Windows.Win32.Foundation.HWND;
using MEMORY_BASIC_INFORMATION = Windows.Win32.System.Memory.MEMORY_BASIC_INFORMATION; using MEMORY_BASIC_INFORMATION = Windows.Win32.System.Memory.MEMORY_BASIC_INFORMATION;
@ -530,8 +532,15 @@ public static partial class Util
var process = new ProcessStartInfo(url) var process = new ProcessStartInfo(url)
{ {
UseShellExecute = true, UseShellExecute = true,
ErrorDialogParentHandle = Service<InterfaceManager>.GetNullable() is { } im
? im.GameWindowHandle
: 0,
Verb = "open",
}; };
Process.Start(process); if (Service<Framework>.GetNullable() is { } fw)
_ = fw.RunOnFrameworkThread(() => Process.Start(process));
else
Process.Start(process);
} }
/// <summary> /// <summary>