Fix request_input_method call in text_input
This commit is contained in:
parent
7979125ed7
commit
f625297475
1 changed files with 14 additions and 13 deletions
|
|
@ -1319,23 +1319,24 @@ where
|
||||||
let state = state::<Renderer>(tree);
|
let state = state::<Renderer>(tree);
|
||||||
|
|
||||||
if let Some(focus) = &mut state.is_focused {
|
if let Some(focus) = &mut state.is_focused {
|
||||||
if focus.is_window_focused
|
if focus.is_window_focused {
|
||||||
&& matches!(
|
if matches!(
|
||||||
state.cursor.state(&self.value),
|
state.cursor.state(&self.value),
|
||||||
cursor::State::Index(_)
|
cursor::State::Index(_)
|
||||||
)
|
) {
|
||||||
{
|
focus.now = *now;
|
||||||
focus.now = *now;
|
|
||||||
|
|
||||||
let millis_until_redraw = CURSOR_BLINK_INTERVAL_MILLIS
|
let millis_until_redraw =
|
||||||
- (*now - focus.updated_at).as_millis()
|
CURSOR_BLINK_INTERVAL_MILLIS
|
||||||
% CURSOR_BLINK_INTERVAL_MILLIS;
|
- (*now - focus.updated_at).as_millis()
|
||||||
|
% CURSOR_BLINK_INTERVAL_MILLIS;
|
||||||
|
|
||||||
shell.request_redraw_at(
|
shell.request_redraw_at(
|
||||||
*now + Duration::from_millis(
|
*now + Duration::from_millis(
|
||||||
millis_until_redraw as u64,
|
millis_until_redraw as u64,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
shell.request_input_method(&self.input_method(
|
shell.request_input_method(&self.input_method(
|
||||||
state,
|
state,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue