From 40964dc9531d2da8922f4e5e26c087a24c598ff3 Mon Sep 17 00:00:00 2001 From: Loren Eteval Date: Mon, 3 Aug 2026 22:44:01 +0800 Subject: [PATCH] Keep Xray routing dialog in foreground Signed-off-by: Loren Eteval --- Furious/Plugins/Official/Xray/Plugin.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Furious/Plugins/Official/Xray/Plugin.py b/Furious/Plugins/Official/Xray/Plugin.py index b3b2b22..13d3cba 100644 --- a/Furious/Plugins/Official/Xray/Plugin.py +++ b/Furious/Plugins/Official/Xray/Plugin.py @@ -225,6 +225,16 @@ class XrayPlugin(FuriousPlugin): routingEditor = UserRoutingWindow(parent=parent, **kwargs) assetViewer = XrayAssetViewerWindow(parent=parent) + def showRoutingDialog(): + """Restore and foreground the persistent routing editor window.""" + if routingEditor.isMinimized(): + routingEditor.showNormal() + else: + routingEditor.show() + + routingEditor.raise_() + routingEditor.activateWindow() + useXrayTUNAction = AppQAction( _('Use Xray-core TUN'), checkable=True, @@ -244,7 +254,7 @@ class XrayPlugin(FuriousPlugin): AppQAction( _('Edit Routing...'), icon=bootstrapIcon('signpost.svg'), - callback=routingEditor.show, + callback=showRoutingDialog, ), AppQSeperator(), useXrayTUNAction,