Provide a way to set cursor area for IME cursor
Rename `Window::set_ime_position` to `Window::set_ime_cursor_area` adding a way to create cursor exclusive zone. Fixes #2886.
This commit is contained in:
parent
66ff52b012
commit
05444628e6
17 changed files with 72 additions and 43 deletions
|
|
@ -1161,10 +1161,11 @@ impl WinitWindow {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_ime_position(&self, spot: Position) {
|
||||
pub fn set_ime_cursor_area(&self, spot: Position, size: Size) {
|
||||
let scale_factor = self.scale_factor();
|
||||
let logical_spot = spot.to_logical(scale_factor);
|
||||
util::set_ime_position_sync(self, logical_spot);
|
||||
let size = size.to_logical(scale_factor);
|
||||
util::set_ime_cursor_area_sync(self, logical_spot, size);
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue