Skip to content

Commit

Permalink
Fix flutter windows level is not topmost and will not return focus to…
Browse files Browse the repository at this point in the history
… prev app on macos
  • Loading branch information
qianlifeng committed Dec 1, 2023
1 parent eb1b0cb commit 826c44e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
2 changes: 0 additions & 2 deletions Wox.UI.Flutter/wox/lib/controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,10 @@ class WoxController extends GetxController {
}

await windowManager.show();
await windowManager.focus();
queryFocusNode.requestFocus();
}

Future<void> hide() async {
await windowManager.blur();
await windowManager.hide();
}

Expand Down
2 changes: 1 addition & 1 deletion Wox.UI.Flutter/wox/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 16208599a12443d53889ba2270a4985981cfb204

COCOAPODS: 1.11.3
COCOAPODS: 1.12.1
9 changes: 5 additions & 4 deletions Wox.UI.Flutter/wox/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,11 @@ packages:
window_manager:
dependency: "direct main"
description:
name: window_manager
sha256: dcc865277f26a7dad263a47d0e405d77e21f12cb71f30333a52710a408690bd7
url: "https://pub.dev"
source: hosted
path: "."
ref: "6f220e952e00f8f3fb3f459cb67e0d08faa752c2"
resolved-ref: "6f220e952e00f8f3fb3f459cb67e0d08faa752c2"
url: "https://github.com/qianlifeng/window_manager.git"
source: git
version: "0.3.7"
xdg_directories:
dependency: transitive
Expand Down
5 changes: 4 additions & 1 deletion Wox.UI.Flutter/wox/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ dependencies:
flutter:
sdk: flutter

window_manager: ^0.3.6
window_manager:
git:
url: https://github.com/qianlifeng/window_manager.git
ref: 6f220e952e00f8f3fb3f459cb67e0d08faa752c2
web_socket_channel: ^2.4.0
flutter_acrylic: ^1.1.0
get: ^4.6.6
Expand Down
9 changes: 9 additions & 0 deletions Wox/setting/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,15 @@ func (m *Manager) LoadPluginSetting(ctx context.Context, pluginId string, defaul
pluginSetting.Settings = defaultSettings.GetAllDefaults()
}

//check if all default settings are present in the plugin settings
//plugin author may add new definitions which are not in the user settings
defaultSettings.GetAllDefaults().Range(func(key string, value string) bool {
if _, exist := pluginSetting.Settings.Load(key); !exist {
pluginSetting.Settings.Store(key, value)
}
return true
})

return pluginSetting, nil
}

Expand Down

0 comments on commit 826c44e

Please sign in to comment.