summaryrefslogtreecommitdiffstats
path: root/widget/src/combo_box.rs
diff options
context:
space:
mode:
authorLibravatar Héctor <hector@hecrj.dev>2025-02-03 22:49:28 +0100
committerLibravatar GitHub <noreply@github.com>2025-02-03 22:49:28 +0100
commit5ab056318e7c2db981f008bd65d9e0b2aacb46c5 (patch)
tree5aa3e2cdb69dd85fe247ba15c8cfc22bb53dd961 /widget/src/combo_box.rs
parentca009ba92af72c09ec6f22ca4eea06fe6228f19d (diff)
parentbab18858cd60168b63ae442026f45a90eb6be731 (diff)
downloadiced-5ab056318e7c2db981f008bd65d9e0b2aacb46c5.tar.gz
iced-5ab056318e7c2db981f008bd65d9e0b2aacb46c5.tar.bz2
iced-5ab056318e7c2db981f008bd65d9e0b2aacb46c5.zip
Merge pull request #2777 from kenz-gelsoft/explore-input-method2
Input Method Support
Diffstat (limited to 'widget/src/combo_box.rs')
-rw-r--r--widget/src/combo_box.rs18
1 files changed, 6 insertions, 12 deletions
diff --git a/widget/src/combo_box.rs b/widget/src/combo_box.rs
index 500d2bec..05793155 100644
--- a/widget/src/combo_box.rs
+++ b/widget/src/combo_box.rs
@@ -63,7 +63,6 @@ use crate::core::renderer;
use crate::core::text;
use crate::core::time::Instant;
use crate::core::widget::{self, Widget};
-use crate::core::window;
use crate::core::{
Clipboard, Element, Event, Length, Padding, Rectangle, Shell, Size, Theme,
Vector,
@@ -554,16 +553,8 @@ where
shell.capture_event();
}
- 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.request_redraw_at(local_shell.redraw_request());
+ shell.request_input_method(local_shell.input_method());
// Then finally react to them here
for message in local_messages {
@@ -742,6 +733,8 @@ where
published_message_to_shell = true;
// Unfocus the input
+ let mut local_messages = Vec::new();
+ let mut local_shell = Shell::new(&mut local_messages);
self.text_input.update(
&mut tree.children[0],
Event::Mouse(mouse::Event::ButtonPressed(
@@ -751,9 +744,10 @@ where
mouse::Cursor::Unavailable,
renderer,
clipboard,
- &mut Shell::new(&mut vec![]),
+ &mut local_shell,
viewport,
);
+ shell.request_input_method(local_shell.input_method());
}
});