commit
						f84cb5a59c
					
				@ -172,15 +172,7 @@ void runConnectionManagerScreen() async {
 | 
				
			|||||||
  // initialize window
 | 
					  // initialize window
 | 
				
			||||||
  WindowOptions windowOptions =
 | 
					  WindowOptions windowOptions =
 | 
				
			||||||
      getHiddenTitleBarWindowOptions(size: const Size(300, 400));
 | 
					      getHiddenTitleBarWindowOptions(size: const Size(300, 400));
 | 
				
			||||||
  await Future.wait([
 | 
					  await initEnv(kAppTypeMain);
 | 
				
			||||||
    initEnv(kAppTypeMain),
 | 
					 | 
				
			||||||
    windowManager.waitUntilReadyToShow(windowOptions, () async {
 | 
					 | 
				
			||||||
      await windowManager.setAlignment(Alignment.topRight);
 | 
					 | 
				
			||||||
      await windowManager.show();
 | 
					 | 
				
			||||||
      await windowManager.focus();
 | 
					 | 
				
			||||||
      await windowManager.setAlignment(Alignment.topRight); // ensure
 | 
					 | 
				
			||||||
    })
 | 
					 | 
				
			||||||
  ]);
 | 
					 | 
				
			||||||
  runApp(GetMaterialApp(
 | 
					  runApp(GetMaterialApp(
 | 
				
			||||||
      debugShowCheckedModeBanner: false,
 | 
					      debugShowCheckedModeBanner: false,
 | 
				
			||||||
      theme: MyTheme.lightTheme,
 | 
					      theme: MyTheme.lightTheme,
 | 
				
			||||||
@ -188,6 +180,12 @@ void runConnectionManagerScreen() async {
 | 
				
			|||||||
      themeMode: MyTheme.initialThemeMode(),
 | 
					      themeMode: MyTheme.initialThemeMode(),
 | 
				
			||||||
      home: const DesktopServerPage(),
 | 
					      home: const DesktopServerPage(),
 | 
				
			||||||
      builder: _keepScaleBuilder()));
 | 
					      builder: _keepScaleBuilder()));
 | 
				
			||||||
 | 
					  windowManager.waitUntilReadyToShow(windowOptions, () async {
 | 
				
			||||||
 | 
					      await windowManager.setAlignment(Alignment.topRight);
 | 
				
			||||||
 | 
					      await windowManager.show();
 | 
				
			||||||
 | 
					      await windowManager.focus();
 | 
				
			||||||
 | 
					      await windowManager.setAlignment(Alignment.topRight); // ensure
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
WindowOptions getHiddenTitleBarWindowOptions({Size? size}) {
 | 
					WindowOptions getHiddenTitleBarWindowOptions({Size? size}) {
 | 
				
			||||||
 | 
				
			|||||||
@ -136,9 +136,15 @@ class PlatformFFI {
 | 
				
			|||||||
        name = linuxInfo.name;
 | 
					        name = linuxInfo.name;
 | 
				
			||||||
        id = linuxInfo.machineId ?? linuxInfo.id;
 | 
					        id = linuxInfo.machineId ?? linuxInfo.id;
 | 
				
			||||||
      } else if (Platform.isWindows) {
 | 
					      } else if (Platform.isWindows) {
 | 
				
			||||||
        WindowsDeviceInfo winInfo = await deviceInfo.windowsInfo;
 | 
					        try {
 | 
				
			||||||
        name = winInfo.computerName;
 | 
					          WindowsDeviceInfo winInfo = await deviceInfo.windowsInfo;
 | 
				
			||||||
        id = winInfo.computerName;
 | 
					          name = winInfo.computerName;
 | 
				
			||||||
 | 
					          id = winInfo.computerName;
 | 
				
			||||||
 | 
					        } catch (e) {
 | 
				
			||||||
 | 
					          debugPrint("$e");
 | 
				
			||||||
 | 
					          name = "unknown";
 | 
				
			||||||
 | 
					          id = "unknown";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
      } else if (Platform.isMacOS) {
 | 
					      } else if (Platform.isMacOS) {
 | 
				
			||||||
        MacOsDeviceInfo macOsInfo = await deviceInfo.macOsInfo;
 | 
					        MacOsDeviceInfo macOsInfo = await deviceInfo.macOsInfo;
 | 
				
			||||||
        name = macOsInfo.computerName;
 | 
					        name = macOsInfo.computerName;
 | 
				
			||||||
 | 
				
			|||||||
@ -80,7 +80,7 @@ dependencies:
 | 
				
			|||||||
    rxdart: ^0.27.5
 | 
					    rxdart: ^0.27.5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dev_dependencies:
 | 
					dev_dependencies:
 | 
				
			||||||
    icons_launcher: ^2.0.5
 | 
					    icons_launcher: ^2.0.4
 | 
				
			||||||
    #flutter_test:
 | 
					    #flutter_test:
 | 
				
			||||||
        #sdk: flutter
 | 
					        #sdk: flutter
 | 
				
			||||||
    build_runner: ^2.1.11
 | 
					    build_runner: ^2.1.11
 | 
				
			||||||
 | 
				
			|||||||
@ -117,7 +117,7 @@ bool Win32Window::CreateAndShow(const std::wstring& title,
 | 
				
			|||||||
  double scale_factor = dpi / 96.0;
 | 
					  double scale_factor = dpi / 96.0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  HWND window = CreateWindow(
 | 
					  HWND window = CreateWindow(
 | 
				
			||||||
      window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE,
 | 
					      window_class, title.c_str(), WS_OVERLAPPEDWINDOW,
 | 
				
			||||||
      Scale(origin.x, scale_factor), Scale(origin.y, scale_factor),
 | 
					      Scale(origin.x, scale_factor), Scale(origin.y, scale_factor),
 | 
				
			||||||
      Scale(size.width, scale_factor), Scale(size.height, scale_factor),
 | 
					      Scale(size.width, scale_factor), Scale(size.height, scale_factor),
 | 
				
			||||||
      nullptr, nullptr, GetModuleHandle(nullptr), this);
 | 
					      nullptr, nullptr, GetModuleHandle(nullptr), this);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user