|
|
@ -23,8 +23,9 @@ pub fn monitor_window_events( |
|
|
|
.spawn() |
|
|
|
.spawn() |
|
|
|
.expect("Failed to subscribe to window events"); |
|
|
|
.expect("Failed to subscribe to window events"); |
|
|
|
let stdout: proc::ChildStdout = child.stdout.unwrap(); |
|
|
|
let stdout: proc::ChildStdout = child.stdout.unwrap(); |
|
|
|
let stream = Deserializer::from_reader(stdout).into_iter::<ipc::ConEvent>(); |
|
|
|
let reader = std::io::BufReader::new(stdout); |
|
|
|
for res in stream { |
|
|
|
let deserializer = Deserializer::from_reader(reader); |
|
|
|
|
|
|
|
for res in deserializer.into_iter::<ipc::ConEvent>() { |
|
|
|
match res { |
|
|
|
match res { |
|
|
|
Ok(win_ev) => handle_con_event(win_ev, con_props.clone()), |
|
|
|
Ok(win_ev) => handle_con_event(win_ev, con_props.clone()), |
|
|
|
Err(err) => eprintln!("Error handling window event:\n{:?}", err), |
|
|
|
Err(err) => eprintln!("Error handling window event:\n{:?}", err), |
|
|
|