Skip to content

Commit c4f4264

Browse files
committed
use set_ime_cursor_area
1 parent 7011d1c commit c4f4264

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

frontends/rioterm/src/application.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -991,9 +991,11 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
991991
route.window.screen.process_key_event(&key_event);
992992

993993
if key_event.state == ElementState::Released
994-
&& self.config.hide_cursor_when_typing
995994
{
996-
route.window.winit_window.set_cursor_visible(false);
995+
route.window.set_ime_cursor_area();
996+
if self.config.hide_cursor_when_typing {
997+
route.window.winit_window.set_cursor_visible(false);
998+
}
997999
}
9981000
}
9991001

frontends/rioterm/src/router/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,10 @@ impl<'a> RouteWindow<'a> {
428428
}
429429
}
430430

431+
pub fn set_ime_cursor_area(&mut self, pos: rio_backend::crosswords::pos::Pos) {
432+
self.winit_window.set_ime_cursor_area(rio_window::dpi::LogicalPosition::new(400.0, 200.0),rio_window::dpi::LogicalSize::new(100, 100));
433+
}
434+
431435
#[allow(clippy::too_many_arguments)]
432436
pub fn from_target<'b>(
433437
event_loop: &'b ActiveEventLoop,

0 commit comments

Comments
 (0)