mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Make OpenLink happen from the main thread
This commit is contained in:
parent
ebe184b10c
commit
2fbccb2e95
1 changed files with 10 additions and 1 deletions
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue