Run Window::set_ime_position on main thread on macOS

Fixes #2756.
This commit is contained in:
Amandus Søve Thorsrud 2023-04-15 01:58:36 +02:00 committed by GitHub
parent 2486f0f1a1
commit 60e91b187a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

View file

@ -1165,8 +1165,7 @@ impl WinitWindow {
pub fn set_ime_position(&self, spot: Position) {
let scale_factor = self.scale_factor();
let logical_spot = spot.to_logical(scale_factor);
// TODO(madsmtm): Remove the need for this
unsafe { Id::from_shared(self.view()) }.set_ime_position(logical_spot);
util::set_ime_position_sync(self, logical_spot);
}
#[inline]