mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-21 09:33:01 +08:00
Merge pull request #1227 from Kingtous/flutter_desktop
fix: avoid window manager re-register in sub window
This commit is contained in:
commit
0697a5bf96
@ -1,6 +1,7 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:desktop_multi_window/desktop_multi_window.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hbb/common.dart';
|
||||
import 'package:flutter_hbb/consts.dart';
|
||||
@ -114,7 +115,11 @@ class _ConnectionTabPageState extends State<ConnectionTabPage>
|
||||
tabController.value = TabController(
|
||||
length: connectionIds.length, vsync: this, initialIndex: initialIndex);
|
||||
if (connectionIds.length == 0) {
|
||||
windowManager.close();
|
||||
WindowController.fromWindowId(windowId()).close();
|
||||
}
|
||||
}
|
||||
|
||||
int windowId() {
|
||||
return widget.params["windowId"];
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:desktop_multi_window/desktop_multi_window.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hbb/common.dart';
|
||||
import 'package:flutter_hbb/desktop/pages/file_manager_page.dart';
|
||||
@ -114,7 +115,11 @@ class _FileManagerTabPageState extends State<FileManagerTabPage>
|
||||
tabController.value = TabController(
|
||||
length: connectionIds.length, initialIndex: initialIndex, vsync: this);
|
||||
if (connectionIds.length == 0) {
|
||||
windowManager.close();
|
||||
WindowController.fromWindowId(windowId()).close();
|
||||
}
|
||||
}
|
||||
|
||||
int windowId() {
|
||||
return widget.params["windowId"];
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ Future<Null> main(List<String> args) async {
|
||||
? Map<String, dynamic>()
|
||||
: jsonDecode(args[2]) as Map<String, dynamic>;
|
||||
int type = argument['type'] ?? -1;
|
||||
argument['windowId'] = windowId;
|
||||
WindowType wType = type.windowType;
|
||||
switch (wType) {
|
||||
case WindowType.RemoteDesktop:
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -28,13 +28,13 @@ dependencies:
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
# Use with the CupertinoIcons class for iOS style icons.
|
||||
cupertino_icons: ^1.0.3
|
||||
ffi: ^1.1.2
|
||||
ffi: ^2.0.1
|
||||
path_provider: ^2.0.2
|
||||
external_path: ^1.0.1
|
||||
provider: ^6.0.3
|
||||
tuple: ^2.0.0
|
||||
wakelock: ^0.5.2
|
||||
device_info_plus: ^3.2.3
|
||||
device_info_plus: ^4.0.2
|
||||
firebase_analytics: ^9.1.5
|
||||
package_info_plus: ^1.4.2
|
||||
url_launcher: ^6.0.9
|
||||
@ -55,11 +55,14 @@ dependencies:
|
||||
url: https://github.com/SoLongAndThanksForAllThePizza/flutter_rust_bridge
|
||||
ref: master
|
||||
path: frb_dart
|
||||
window_manager: ^0.2.5
|
||||
window_manager:
|
||||
git:
|
||||
url: https://github.com/Kingtous/rustdesk_window_manager
|
||||
ref: 028a7f6
|
||||
desktop_multi_window:
|
||||
git:
|
||||
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
|
||||
ref: 7cd2d885e58397766f3f03a1e632299944580aac
|
||||
ref: ce9e333d822fe6cbf91c8634bae023bf78700d94
|
||||
# bitsdojo_window: ^0.1.2
|
||||
freezed_annotation: ^2.0.3
|
||||
tray_manager: 0.1.7
|
||||
|
Loading…
Reference in New Issue
Block a user