aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2022-09-15 23:51:06 +0300
committerChristian Duerr <contact@christianduerr.com>2022-09-17 14:31:31 +0000
commit5dfcb9f02b7b6117762197c5b58ddf1a16c33290 (patch)
treeb21923a2c81ef1ed658ea657c99dbaed31bf75d1
parent5f02a83c36802ff493159836bfca4fd5709042e1 (diff)
downloadalacritty-5dfcb9f02b7b6117762197c5b58ddf1a16c33290.tar.gz
alacritty-5dfcb9f02b7b6117762197c5b58ddf1a16c33290.zip
Bump winit to 0.27.3
Fixes #6324. Fixes #6313.
-rw-r--r--Cargo.lock4
-rw-r--r--alacritty/src/display/mod.rs2
-rw-r--r--alacritty/src/event.rs10
3 files changed, 8 insertions, 8 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 0abb4659..dbf1e251 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2039,9 +2039,9 @@ checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"
[[package]]
name = "winit"
-version = "0.27.2"
+version = "0.27.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83a8f3e9d742401efcfe833b8f84960397482ff049cb7bf59a112e14a4be97f7"
+checksum = "a22e94ba35ca3ff11820044bfa0dc48b95a3a15569c0068555566a12ef41c9e5"
dependencies = [
"bitflags",
"cocoa",
diff --git a/alacritty/src/display/mod.rs b/alacritty/src/display/mod.rs
index aba674fb..bcc7358d 100644
--- a/alacritty/src/display/mod.rs
+++ b/alacritty/src/display/mod.rs
@@ -419,7 +419,7 @@ impl Ime {
}
}
-#[derive(Debug, Default)]
+#[derive(Debug, Default, PartialEq, Eq)]
pub struct Preedit {
/// The preedit text.
text: String,
diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs
index bd4b60b2..853e3f5e 100644
--- a/alacritty/src/event.rs
+++ b/alacritty/src/event.rs
@@ -1236,8 +1236,6 @@ impl input::Processor<EventProxy, ActionContext<'_, Notifier, EventProxy>> {
},
WindowEvent::Ime(ime) => match ime {
Ime::Commit(text) => {
- // Clear preedit.
- self.ctx.display.ime.set_preedit(None);
*self.ctx.dirty = true;
for ch in text.chars() {
@@ -1253,9 +1251,11 @@ impl input::Processor<EventProxy, ActionContext<'_, Notifier, EventProxy>> {
Some(Preedit::new(text, cursor_offset.map(|offset| offset.0)))
};
- self.ctx.display.ime.set_preedit(preedit);
- self.ctx.update_cursor_blinking();
- *self.ctx.dirty = true;
+ if self.ctx.display.ime.preedit() != preedit.as_ref() {
+ self.ctx.display.ime.set_preedit(preedit);
+ self.ctx.update_cursor_blinking();
+ *self.ctx.dirty = true;
+ }
},
Ime::Enabled => {
self.ctx.display.ime.set_enabled(true);