mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-31 09:00:54 +03:00
Allow input capture & emulation being disabled (#158)
* Input capture and emulation can now be disabled and will prompt the user to enable again. * Improved error handling to deliver more useful error messages
This commit is contained in:
committed by
GitHub
parent
55bdf1e63e
commit
bea7d6f8a5
@@ -8,7 +8,7 @@ use std::{
|
||||
process, str,
|
||||
};
|
||||
|
||||
use crate::frontend::{gtk::window::Window, FrontendRequest};
|
||||
use crate::frontend::gtk::window::Window;
|
||||
|
||||
use adw::Application;
|
||||
use endi::{Endian, ReadBytes};
|
||||
@@ -113,7 +113,6 @@ fn build_ui(app: &Application) {
|
||||
});
|
||||
|
||||
let window = Window::new(app, tx);
|
||||
window.request(FrontendRequest::Enumerate());
|
||||
|
||||
glib::spawn_future_local(clone!(@weak window => async move {
|
||||
loop {
|
||||
@@ -150,6 +149,12 @@ fn build_ui(app: &Application) {
|
||||
}
|
||||
window.imp().set_port(port);
|
||||
}
|
||||
FrontendEvent::CaptureStatus(s) => {
|
||||
window.set_capture(s.into());
|
||||
}
|
||||
FrontendEvent::EmulationStatus(s) => {
|
||||
window.set_emulation(s.into());
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user