Refactor and simplify input_method API
This commit is contained in:
parent
d5ee9c2795
commit
ae10adda74
19 changed files with 540 additions and 472 deletions
|
|
@ -6,7 +6,6 @@ use crate::core::overlay;
|
|||
use crate::core::renderer;
|
||||
use crate::core::widget;
|
||||
use crate::core::widget::tree::{self, Tree};
|
||||
use crate::core::window;
|
||||
use crate::core::{
|
||||
self, Clipboard, Element, Length, Point, Rectangle, Shell, Size, Vector,
|
||||
Widget,
|
||||
|
|
@ -344,18 +343,8 @@ where
|
|||
}
|
||||
|
||||
local_shell.revalidate_layout(|| shell.invalidate_layout());
|
||||
|
||||
if let Some(redraw_request) = local_shell.redraw_request() {
|
||||
match redraw_request {
|
||||
window::RedrawRequest::NextFrame => {
|
||||
shell.request_redraw();
|
||||
}
|
||||
window::RedrawRequest::At(at) => {
|
||||
shell.request_redraw_at(at);
|
||||
}
|
||||
}
|
||||
}
|
||||
shell.update_caret_info(local_shell.caret_info());
|
||||
shell.request_redraw_at(local_shell.redraw_request());
|
||||
shell.request_input_method(local_shell.input_method());
|
||||
|
||||
if !local_messages.is_empty() {
|
||||
let mut heads = self.state.take().unwrap().into_heads();
|
||||
|
|
@ -630,18 +619,8 @@ where
|
|||
}
|
||||
|
||||
local_shell.revalidate_layout(|| shell.invalidate_layout());
|
||||
|
||||
if let Some(redraw_request) = local_shell.redraw_request() {
|
||||
match redraw_request {
|
||||
window::RedrawRequest::NextFrame => {
|
||||
shell.request_redraw();
|
||||
}
|
||||
window::RedrawRequest::At(at) => {
|
||||
shell.request_redraw_at(at);
|
||||
}
|
||||
}
|
||||
}
|
||||
shell.update_caret_info(local_shell.caret_info());
|
||||
shell.request_redraw_at(local_shell.redraw_request());
|
||||
shell.request_input_method(local_shell.input_method());
|
||||
|
||||
if !local_messages.is_empty() {
|
||||
let mut inner =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue