Skip to content

Commit

Permalink
The most minimal fix possible for inter-window messages not being pro…
Browse files Browse the repository at this point in the history
…cessed (#473)

Addresses #463 in the absolutely most minimal way possible - just loop over all
windows and process any pending events at the end of event processing for any
window.
  • Loading branch information
timboudreau authored May 29, 2024
1 parent d171f22 commit 6fe51db
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/app_handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ impl ApplicationHandle {
}
}
}
self.handle_updates_for_all_windows();
}

pub(crate) fn new_window(
Expand Down Expand Up @@ -386,6 +387,10 @@ impl ApplicationHandle {
while let Some(trigger) = { EXT_EVENT_HANDLER.queue.lock().pop_front() } {
trigger.notify();
}
self.handle_updates_for_all_windows();
}

fn handle_updates_for_all_windows(&mut self) {
for (_, handle) in self.window_handles.iter_mut() {
handle.process_update();
}
Expand Down Expand Up @@ -426,9 +431,7 @@ impl ApplicationHandle {
(timer.action)(token);
}
}
for (_, handle) in self.window_handles.iter_mut() {
handle.process_update();
}
self.handle_updates_for_all_windows();
}
self.fire_timer(event_loop);
}
Expand Down

0 comments on commit 6fe51db

Please sign in to comment.