From 0c4614d6566ad3a68eb498b5f04c32bee9e47b4d Mon Sep 17 00:00:00 2001 From: Joe Neeman Date: Thu, 25 Jun 2020 14:45:03 -0500 Subject: [PATCH 1/3] Call update after running commands in the idle handler. --- druid/src/win_handler.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/druid/src/win_handler.rs b/druid/src/win_handler.rs index f13de75cc6..5c4c0b34e0 100644 --- a/druid/src/win_handler.rs +++ b/druid/src/win_handler.rs @@ -485,12 +485,14 @@ impl AppState { match token { RUN_COMMANDS_TOKEN => { self.process_commands(); + self.inner.borrow_mut().do_update(); self.inner.borrow_mut().invalidate_and_finalize(); } EXT_EVENT_IDLE_TOKEN => { self.process_ext_events(); self.process_commands(); self.inner.borrow_mut().do_update(); + self.inner.borrow_mut().invalidate_and_finalize(); } other => log::warn!("unexpected idle token {:?}", other), } From 9d83ab61c86450350d0b434d56d1ea7c1d7703b0 Mon Sep 17 00:00:00 2001 From: Joe Neeman Date: Sat, 27 Jun 2020 18:31:04 -0500 Subject: [PATCH 2/3] Remove redundant invalidate_and_finalize. --- druid/src/win_handler.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/druid/src/win_handler.rs b/druid/src/win_handler.rs index 5c4c0b34e0..af5234d38a 100644 --- a/druid/src/win_handler.rs +++ b/druid/src/win_handler.rs @@ -486,13 +486,11 @@ impl AppState { RUN_COMMANDS_TOKEN => { self.process_commands(); self.inner.borrow_mut().do_update(); - self.inner.borrow_mut().invalidate_and_finalize(); } EXT_EVENT_IDLE_TOKEN => { self.process_ext_events(); self.process_commands(); self.inner.borrow_mut().do_update(); - self.inner.borrow_mut().invalidate_and_finalize(); } other => log::warn!("unexpected idle token {:?}", other), } From 678ea414c4f917fa35cb0d4752f69c39bd978303 Mon Sep 17 00:00:00 2001 From: Joe Neeman Date: Sat, 27 Jun 2020 18:32:29 -0500 Subject: [PATCH 3/3] Add changelog entry. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51929045a3..6a48909ec8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ You can find its changes [documented below](#060---2020-06-01). - macOS: Timers not firing during modal loop. ([#1028] by [@xStrom]) - GTK: Directory selection now properly ignores file filters. ([#957] by [@xStrom]) - GTK: Don't crash when receiving an external command while a file dialog is visible. ([#1043] by [@jneem]) +- Ensure that `update` is called after all commands. ([#1062] by [@jneem]) ### Visual @@ -340,6 +341,7 @@ Last release without a changelog :( [#1043]: https://github.com/linebender/druid/pull/1043 [#1050]: https://github.com/linebender/druid/pull/1050 [#1054]: https://github.com/linebender/druid/pull/1054 +[#1062]: https://github.com/linebender/druid/pull/1062 [Unreleased]: https://github.com/linebender/druid/compare/v0.6.0...master [0.6.0]: https://github.com/linebender/druid/compare/v0.5.0...v0.6.0