mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 19:17:58 +00:00
feat: add dbus and cli connect support
This commit is contained in:
@@ -10,6 +10,7 @@ import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_hbb/desktop/widgets/tabbar_widget.dart';
|
||||
import 'package:flutter_hbb/main.dart';
|
||||
import 'package:flutter_hbb/models/peer_model.dart';
|
||||
import 'package:flutter_hbb/utils/multi_window_manager.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -1128,6 +1129,19 @@ Future<bool> restoreWindowPosition(WindowType type, {int? windowId}) async {
|
||||
return false;
|
||||
}
|
||||
|
||||
void checkArguments() {
|
||||
// check connect args
|
||||
final connectIndex = bootArgs.indexOf("--connect");
|
||||
if (connectIndex == -1) {
|
||||
return;
|
||||
}
|
||||
String? peerId = bootArgs.length < connectIndex + 1 ? null: bootArgs[connectIndex + 1];
|
||||
if (peerId != null) {
|
||||
rustDeskWinManager.newRemoteDesktop(peerId);
|
||||
bootArgs.removeAt(connectIndex); bootArgs.removeAt(connectIndex);
|
||||
}
|
||||
}
|
||||
|
||||
/// Connect to a peer with [id].
|
||||
/// If [isFileTransfer], starts a session only for file transfer.
|
||||
/// If [isTcpTunneling], starts a session only for tcp tunneling.
|
||||
|
||||
Reference in New Issue
Block a user