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:
Ferdinand Schober
2023-12-09 00:36:01 +01:00
committed by GitHub
parent 9b242f6138
commit 56e5f7a30d
13 changed files with 488 additions and 170 deletions

View File

@@ -1,4 +1,3 @@
use anyhow::Result;
use async_trait::async_trait;
use crate::{event::{KeyboardEvent, PointerEvent}, consumer::EventConsumer};
use winapi::{

View File

@@ -1,4 +1,5 @@
use std::{error::Error, io, result::Result, task::Poll};
use anyhow::Result;
use std::{io, task::Poll};
use futures_core::Stream;
@@ -7,7 +8,7 @@ use crate::{producer::EventProducer, event::Event, client::ClientHandle};
pub struct LibeiProducer {}
impl LibeiProducer {
pub fn new() -> Result<Self, Box<dyn Error>> {
pub fn new() -> Result<Self> {
Ok(Self { })
}
}