From aae6760df7b24b83f0f4b5cc8f20b5270808189e Mon Sep 17 00:00:00 2001 From: XavierChanth Date: Fri, 6 Dec 2024 09:24:01 -0500 Subject: [PATCH 1/2] fix: window behavior --- .../tray_manager/cubit/tray_cubit.dart | 28 +++++++++---------- packages/dart/npt_flutter/lib/main.dart | 7 ++--- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/packages/dart/npt_flutter/lib/features/tray_manager/cubit/tray_cubit.dart b/packages/dart/npt_flutter/lib/features/tray_manager/cubit/tray_cubit.dart index 540fb68e5..112b9b9a9 100644 --- a/packages/dart/npt_flutter/lib/features/tray_manager/cubit/tray_cubit.dart +++ b/packages/dart/npt_flutter/lib/features/tray_manager/cubit/tray_cubit.dart @@ -69,23 +69,21 @@ class TrayCubit extends LoggingCubit { (String, void Function(MenuItem)) _getAction(TrayAction action, AppLocalizations localizations) { return switch (action) { - TrayAction.showDashboard => (localizations.showWindow, (_) => windowManager.focus()), + TrayAction.showDashboard => (localizations.showWindow, (_) => windowManager.show(inactive: true)), TrayAction.showSettings => ( localizations.settings, - (_) { - windowManager.focus().then((_) { - var context = App.navState.currentContext; - if (context == null) return; - if (context.mounted) { - var cubit = context.read(); - if (cubit.getStatus() != OnboardingStatus.onboarded) return; - Navigator.of(context).pushNamedAndRemoveUntil( - Routes.settings, - (route) => route.isFirst, - ); - } - }); - } + (_) => windowManager.show(inactive: true).then((_) { + var context = App.navState.currentContext; + if (context == null) return; + if (context.mounted) { + var cubit = context.read(); + if (cubit.getStatus() != OnboardingStatus.onboarded) return; + Navigator.of(context).pushNamedAndRemoveUntil( + Routes.settings, + (route) => route.isFirst, + ); + } + }) ), TrayAction.quitApp => ( localizations.quit, diff --git a/packages/dart/npt_flutter/lib/main.dart b/packages/dart/npt_flutter/lib/main.dart index daeead29c..9feea4dd7 100644 --- a/packages/dart/npt_flutter/lib/main.dart +++ b/packages/dart/npt_flutter/lib/main.dart @@ -1,5 +1,3 @@ -import 'dart:io'; - import 'package:flutter/material.dart'; import 'package:npt_flutter/constants.dart'; import 'package:window_manager/window_manager.dart'; @@ -9,11 +7,10 @@ import 'app.dart'; Future main() async { WidgetsFlutterBinding.ensureInitialized(); - var windowOptions = WindowOptions( + var windowOptions = const WindowOptions( title: "NoPorts Desktop", minimumSize: Constants.kWindowsMinWindowSize, - skipTaskbar: Platform.isWindows, - alwaysOnTop: true, + skipTaskbar: false, ); windowManager.ensureInitialized(); windowManager.waitUntilReadyToShow(windowOptions); From 140d01d99163d39d34f73ebd492ba5373be182cb Mon Sep 17 00:00:00 2001 From: XavierChanth Date: Fri, 6 Dec 2024 09:24:01 -0500 Subject: [PATCH 2/2] chore: Update build information --- packages/dart/npt_flutter/macos/Podfile.lock | 2 +- packages/dart/npt_flutter/pubspec.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/dart/npt_flutter/macos/Podfile.lock b/packages/dart/npt_flutter/macos/Podfile.lock index e47331eb8..baec81b66 100644 --- a/packages/dart/npt_flutter/macos/Podfile.lock +++ b/packages/dart/npt_flutter/macos/Podfile.lock @@ -87,4 +87,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367 -COCOAPODS: 1.14.3 +COCOAPODS: 1.15.2 diff --git a/packages/dart/npt_flutter/pubspec.yaml b/packages/dart/npt_flutter/pubspec.yaml index 2d729e34d..df0d9c768 100644 --- a/packages/dart/npt_flutter/pubspec.yaml +++ b/packages/dart/npt_flutter/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.1.2+2 +version: 1.1.3+0 environment: sdk: ^3.5.0 @@ -134,10 +134,10 @@ flutter: msix_config: display_name: "NoPorts Desktop" - publisher_display_name: Atsign + publisher_display_name: Atsign Inc identity_name: TheCompany.NoPortsDesktop publisher: CN=BBFE1D0B-F713-4C7F-B375-5EA851CBB1FF - msix_version: 1.1.2.0 + msix_version: 1.1.3.0 logo_path: "assets/logo.png" capabilities: internetClient store: true