mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-02 12:11:27 +03:00
Background service (#43)
better handling of background-service: lan-mouse can now be run without a gui by specifying --daemon as an argument. Otherwise the servic will be run as a child process and correctly terminate when the window is closed / frontend exits. Closes #38
This commit is contained in:
committed by
GitHub
parent
9b242f6138
commit
56e5f7a30d
@@ -1,4 +1,5 @@
|
||||
use std::{error::Error, io};
|
||||
use anyhow::Result;
|
||||
use std::io;
|
||||
|
||||
use futures_core::Stream;
|
||||
|
||||
@@ -15,7 +16,7 @@ enum Backend {
|
||||
X11,
|
||||
}
|
||||
|
||||
pub fn create() -> Result<Box<dyn EventProducer>, Box<dyn Error>> {
|
||||
pub async fn create() -> Result<Box<dyn EventProducer>> {
|
||||
#[cfg(windows)]
|
||||
return Ok(Box::new(producer::windows::WindowsProducer::new()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user