Keep Xray routing dialog in foreground

Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
Loren Eteval
2026-08-12 12:20:17 +08:00
parent 189d8793fe
commit 40964dc953
+11 -1
View File
@@ -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,