mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 02:57:22 +00:00
fix: --cm cannot exit on macOS
This commit is contained in:
@@ -1399,12 +1399,12 @@ class FFI {
|
||||
await setCanvasConfig(id, cursorModel.x, cursorModel.y, canvasModel.x,
|
||||
canvasModel.y, canvasModel.scale, ffiModel.pi.currentDisplay);
|
||||
}
|
||||
bind.sessionClose(id: id);
|
||||
imageModel.update(null);
|
||||
cursorModel.clear();
|
||||
ffiModel.clear();
|
||||
canvasModel.clear();
|
||||
inputModel.resetModifiers();
|
||||
await bind.sessionClose(id: id);
|
||||
debugPrint('model $id closed');
|
||||
id = '';
|
||||
}
|
||||
|
||||
@@ -560,10 +560,8 @@ class ServerModel with ChangeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
closeAll() {
|
||||
for (var client in _clients) {
|
||||
bind.cmCloseConnection(connId: client.id);
|
||||
}
|
||||
Future<void> closeAll() async {
|
||||
await Future.wait(_clients.map((client) => bind.cmCloseConnection(connId: client.id)));
|
||||
_clients.clear();
|
||||
tabController.state.value.tabs.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user