feat: implement tray in linux

This commit is contained in:
Kingtous
2022-11-04 19:20:51 +08:00
parent 884a223449
commit 220d056760
7 changed files with 117 additions and 14 deletions

View File

@@ -432,7 +432,8 @@ class _DesktopHomePageState extends State<DesktopHomePage>
updateUrl = await bind.mainGetSoftwareUpdateUrl();
if (updateUrl.isNotEmpty) setState(() {});
});
initTray();
// disable this tray because we use tray function provided by rust now
// initTray();
trayManager.addListener(this);
windowManager.addListener(this);
rustDeskWinManager.setMethodHandler((call, fromWindowId) async {

View File

@@ -90,10 +90,6 @@ class PlatformFFI {
/// Init the FFI class, loads the native Rust core library.
Future<void> init(String appType) async {
_appType = appType;
// if (isDesktop) {
// // TODO
// return;
// }
final dylib = Platform.isAndroid
? DynamicLibrary.open('librustdesk.so')
: Platform.isLinux