fix: make event loop in tray compatible with main window

This commit is contained in:
Kingtous
2023-05-02 12:52:27 +08:00
parent 4e7a8065b9
commit 7a82070420
8 changed files with 45 additions and 23 deletions

View File

@@ -1581,7 +1581,13 @@ bool checkArguments() {
/// Returns true if we successfully handle the uri provided.
/// [Functions]
/// 1. New Connection: rustdesk://connection/new/your_peer_id
/// 2. Bring the main window to the top: empty uriPath
bool parseRustdeskUri(String uriPath) {
// If we invoke uri with blank path, we just bring the main window to tht top.
if (uriPath.isEmpty) {
window_on_top(null);
return true;
}
final uri = Uri.tryParse(uriPath);
if (uri == null) {
debugPrint("uri is not valid: $uriPath");