mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-14 16:31:28 +03:00
cleanup server code + fix a lost update case (#191)
This commit is contained in:
committed by
GitHub
parent
6cd190191e
commit
39fed0344c
@@ -6,7 +6,7 @@ use std::{env, process, str};
|
||||
|
||||
use window::Window;
|
||||
|
||||
use lan_mouse_ipc::FrontendEvent;
|
||||
use lan_mouse_ipc::{FrontendEvent, FrontendRequest};
|
||||
|
||||
use adw::Application;
|
||||
use gtk::{
|
||||
@@ -92,6 +92,9 @@ fn build_ui(app: &Application) {
|
||||
loop {
|
||||
let notify = receiver.recv().await.unwrap_or_else(|_| process::exit(1));
|
||||
match notify {
|
||||
FrontendEvent::Changed(handle) => {
|
||||
window.request(FrontendRequest::GetState(handle));
|
||||
}
|
||||
FrontendEvent::Created(handle, client, state) => {
|
||||
window.new_client(handle, client, state);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user