We have two most important delegate events, one is openURL (url schema) via browser, another one is launchpad click.
When --server is running, the delegate events will be captured by --server background process, the delegate listeners are registered in tao crate. It also may be captured by --service which caused launchpad click failure, here is a fix for this.
When --server receives the delegate, it will check if there is RustDesk window.
- If there is,
--serverwill send url schema via ipc. - If there is not,
--serverwill run commandrustdesk <url-schema>, url schema will be sent to main.dart directly via args.
When --server is not running, the openURL delegate events will be sent to RustDesk window directly in two ways,
- No window opened while receiving the url schema, here.
- Window already open while receiving the url schema, here, and we have a stupid bug fix for this.
the openURL delegate listen is registered in uni_links_desktop, the url schema will be propogated to dart via uni_links_desktop. launchpad click delegate event listener is registered here.