wayland: ime: clear compose state after commit

refs: #1772
This commit is contained in:
Wez Furlong committed 2022-07-09 23:12:43 -07:00
1 parent ffe76bae3a
commit 607287935f
1 file changed
+7 -5
+7 -5
View File
@@ -44,16 +44,18 @@ impl Inner {
}));
}
Event::CommitString { text } => {
conn.dispatch_to_focused_window(match text {
Some(text) => WindowEvent::KeyEvent(KeyEvent {
if let Some(text) = text {
conn.dispatch_to_focused_window(WindowEvent::KeyEvent(KeyEvent {
key: KeyCode::composed(&text),
modifiers: Modifiers::NONE,
repeat_count: 1,
key_is_down: true,
raw: None,
}),
None => WindowEvent::AdviseDeadKeyStatus(DeadKeyStatus::None),
});
}));
}
conn.dispatch_to_focused_window(WindowEvent::AdviseDeadKeyStatus(
DeadKeyStatus::None,
));
}
Event::Done { serial: _ } => {}
_ => {}