From 1cb7ef16d1fc688cd18c7749582138f68305070f Mon Sep 17 00:00:00 2001 From: qianlifeng Date: Mon, 29 Apr 2024 00:05:41 +0800 Subject: [PATCH] #4008 Fix ui is not showup on windows after start Wox --- .../wox/lib/modules/launcher/wox_launcher_controller.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Wox.UI.Flutter/wox/lib/modules/launcher/wox_launcher_controller.dart b/Wox.UI.Flutter/wox/lib/modules/launcher/wox_launcher_controller.dart index 115176bde..20dd264ea 100644 --- a/Wox.UI.Flutter/wox/lib/modules/launcher/wox_launcher_controller.dart +++ b/Wox.UI.Flutter/wox/lib/modules/launcher/wox_launcher_controller.dart @@ -91,6 +91,11 @@ class WoxLauncherController extends GetxController implements WoxLauncherInterfa await windowManager.setPosition(Offset(params.position.x.toDouble(), params.position.y.toDouble())); } await windowManager.show(); + if(Platform.isWindows) { + // on windows, it is somehow necessary to invoke show twice to make the window show + // otherwise, the window will not show up if it is the first time to invoke showApp + await windowManager.show(); + } await windowManager.focus(); queryBoxFocusNode.requestFocus();