Skip to content

Commit

Permalink
Fix widget operations in multi_window runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Jun 7, 2024
1 parent e9d02af commit e664994
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions winit/src/multi_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1272,25 +1272,20 @@ fn run_command<A, C, E>(
std::mem::take(ui_caches),
);

'operate: while let Some(mut operation) =
current_operation.take()
{
while let Some(mut operation) = current_operation.take() {
for (id, ui) in uis.iter_mut() {
if let Some(window) = window_manager.get_mut(*id) {
ui.operate(&window.renderer, operation.as_mut());
}
}

match operation.finish() {
operation::Outcome::None => {}
operation::Outcome::Some(message) => {
proxy.send(message);

// operation completed, don't need to try to operate on rest of UIs
break 'operate;
}
operation::Outcome::Chain(next) => {
current_operation = Some(next);
}
}
match operation.finish() {
operation::Outcome::None => {}
operation::Outcome::Some(message) => {
proxy.send(message);
}
operation::Outcome::Chain(next) => {
current_operation = Some(next);
}
}
}
Expand Down

0 comments on commit e664994

Please sign in to comment.