osk not redrawing fix???

This commit is contained in:
stjet
2025-02-09 18:31:30 +00:00
parent 972d4fc425
commit 2be106e3e6
2 changed files with 14 additions and 1 deletions

View File

@@ -42,6 +42,16 @@ pub enum WindowMessageResponse {
DoNothing, DoNothing,
} }
impl WindowMessageResponse {
pub fn is_key_char_request(&self) -> bool {
if let WindowMessageResponse::Request(WindowManagerRequest::DoKeyChar(_)) = self {
true
} else {
false
}
}
}
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
pub struct KeyPress { pub struct KeyPress {
pub key: char, pub key: char,

View File

@@ -648,11 +648,14 @@ impl WindowManager {
} }
}; };
if response != WindowMessageResponse::DoNothing { if response != WindowMessageResponse::DoNothing {
let is_key_char_request = response.is_key_char_request();
match response { match response {
WindowMessageResponse::Request(request) => self.handle_request(request), WindowMessageResponse::Request(request) => self.handle_request(request),
_ => {}, _ => {},
}; };
self.draw(redraw_ids, use_saved_buffer); if !is_key_char_request {
self.draw(redraw_ids, use_saved_buffer);
}
} }
} }