2828 pub state : State < P > ,
2929 pub mouse_interaction : mouse:: Interaction ,
3030 preedit : Option < Preedit < P :: Renderer > > ,
31- ime_state : Option < ( iced_core:: Point , input_method:: Purpose ) > ,
31+ ime_state : Option < ( iced_core:: Rectangle , input_method:: Purpose ) > ,
3232}
3333
3434pub struct WindowManager < P : Program , C : Compositor >
@@ -166,18 +166,18 @@ where
166166 match input_method {
167167 InputMethod :: Disabled => self . disable_ime ( ) ,
168168 InputMethod :: Enabled {
169- position,
170169 purpose,
171170 preedit,
171+ cursor,
172172 } => {
173173 let mut flags = ImeState :: empty ( ) ;
174174 if self . ime_state . is_none ( ) {
175175 flags. insert ( ImeState :: Allowed ) ;
176176 }
177- if self . ime_state != Some ( ( position , purpose) ) {
177+ if self . ime_state != Some ( ( cursor , purpose) ) {
178178 flags. insert ( ImeState :: Update ) ;
179179 }
180- self . update_ime ( position , purpose) ;
180+ self . update_ime ( cursor , purpose) ;
181181
182182 if let Some ( preedit) = preedit {
183183 if preedit. content . is_empty ( ) {
@@ -186,7 +186,7 @@ where
186186 let mut overlay = self . preedit . take ( ) . unwrap_or_else ( Preedit :: new) ;
187187
188188 overlay. update (
189- position ,
189+ cursor ,
190190 & preedit,
191191 self . state . background_color ( ) ,
192192 & self . renderer ,
@@ -216,7 +216,7 @@ where
216216 }
217217 }
218218
219- fn update_ime ( & mut self , position : iced_core:: Point , purpose : input_method:: Purpose ) {
219+ fn update_ime ( & mut self , position : iced_core:: Rectangle , purpose : input_method:: Purpose ) {
220220 if self . ime_state != Some ( ( position, purpose) ) {
221221 self . ime_state = Some ( ( position, purpose) ) ;
222222 }
0 commit comments