summaryrefslogtreecommitdiffstats
path: root/winit/src/program/window_manager.rs
diff options
context:
space:
mode:
Diffstat (limited to 'winit/src/program/window_manager.rs')
-rw-r--r--winit/src/program/window_manager.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/winit/src/program/window_manager.rs b/winit/src/program/window_manager.rs
index 25d3ad9c..4156e7c8 100644
--- a/winit/src/program/window_manager.rs
+++ b/winit/src/program/window_manager.rs
@@ -221,15 +221,10 @@ where
if let Some(preedit) = preedit {
if preedit.content.is_empty() {
self.preedit = None;
- } else if let Some(overlay) = &mut self.preedit {
- overlay.update(
- position,
- &preedit,
- self.state.background_color(),
- &self.renderer,
- );
} else {
- let mut overlay = Preedit::new();
+ let mut overlay =
+ self.preedit.take().unwrap_or_else(Preedit::new);
+
overlay.update(
position,
&preedit,