From 2fbccb2e957d56908b0f0f5196ff92e235004264 Mon Sep 17 00:00:00 2001 From: Soreepeong <3614868+Soreepeong@users.noreply.github.com> Date: Thu, 7 Aug 2025 07:50:45 +0900 Subject: [PATCH] Make OpenLink happen from the main thread --- Dalamud/Utility/Util.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Dalamud/Utility/Util.cs b/Dalamud/Utility/Util.cs index a95f3ed66..591479fbd 100644 --- a/Dalamud/Utility/Util.cs +++ b/Dalamud/Utility/Util.cs @@ -27,6 +27,8 @@ using Windows.Win32.System.Memory; using Windows.Win32.System.Ole; using Windows.Win32.UI.WindowsAndMessaging; +using Dalamud.Interface.Internal; + using FLASHWINFO = Windows.Win32.UI.WindowsAndMessaging.FLASHWINFO; using HWND = Windows.Win32.Foundation.HWND; 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) { UseShellExecute = true, + ErrorDialogParentHandle = Service.GetNullable() is { } im + ? im.GameWindowHandle + : 0, + Verb = "open", }; - Process.Start(process); + if (Service.GetNullable() is { } fw) + _ = fw.RunOnFrameworkThread(() => Process.Start(process)); + else + Process.Start(process); } ///