Fixed state syncing issue with MW.
This commit is contained in:
parent
bd58d5fe25
commit
50b9c778b1
1 changed files with 23 additions and 20 deletions
|
|
@ -502,12 +502,16 @@ async fn run_instance<A, E, C>(
|
||||||
|| compositor.fetch_information(),
|
|| compositor.fetch_information(),
|
||||||
);
|
);
|
||||||
|
|
||||||
// synchronize window state with application state.
|
// synchronize window states with application states.
|
||||||
states.get_mut(&id).unwrap().synchronize(
|
for (id, state) in states.iter_mut() {
|
||||||
&application,
|
state.synchronize(
|
||||||
id,
|
&application,
|
||||||
windows.get(&id).expect("No window found with ID."),
|
*id,
|
||||||
);
|
windows
|
||||||
|
.get(id)
|
||||||
|
.expect("No window found with ID."),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
interfaces = ManuallyDrop::new(build_user_interfaces(
|
interfaces = ManuallyDrop::new(build_user_interfaces(
|
||||||
&application,
|
&application,
|
||||||
|
|
@ -575,20 +579,19 @@ async fn run_instance<A, E, C>(
|
||||||
crate::event::Status::Ignored,
|
crate::event::Status::Ignored,
|
||||||
));
|
));
|
||||||
|
|
||||||
let _ =
|
let _ = control_sender.start_send(match interface_state {
|
||||||
control_sender.start_send(match interface_state {
|
user_interface::State::Updated {
|
||||||
user_interface::State::Updated {
|
redraw_request: Some(redraw_request),
|
||||||
redraw_request: Some(redraw_request),
|
} => match redraw_request {
|
||||||
} => match redraw_request {
|
window::RedrawRequest::NextFrame => {
|
||||||
window::RedrawRequest::NextFrame => {
|
ControlFlow::Poll
|
||||||
ControlFlow::Poll
|
}
|
||||||
}
|
window::RedrawRequest::At(at) => {
|
||||||
window::RedrawRequest::At(at) => {
|
ControlFlow::WaitUntil(at)
|
||||||
ControlFlow::WaitUntil(at)
|
}
|
||||||
}
|
},
|
||||||
},
|
_ => ControlFlow::Wait,
|
||||||
_ => ControlFlow::Wait,
|
});
|
||||||
});
|
|
||||||
|
|
||||||
redraw_pending = false;
|
redraw_pending = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue