osk not redrawing fix???
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user