Mac: Redraw immediately to prevent shaking on window resize (#1901)
* Mac: Redraw immediately to prevent shaking on window resize * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: 李小鹏 <lixiaopeng.jetspark@bytedance.com> Co-authored-by: Markus Røyset <maroider@protonmail.com>
This commit is contained in:
parent
0487876826
commit
ba704c4eb4
3 changed files with 6 additions and 1 deletions
|
|
@ -327,6 +327,10 @@ impl AppState {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn handle_redraw(window_id: WindowId) {
|
||||
HANDLER.handle_nonuser_event(EventWrapper::StaticEvent(Event::RedrawRequested(window_id)));
|
||||
}
|
||||
|
||||
pub fn queue_event(wrapper: EventWrapper) {
|
||||
if !unsafe { msg_send![class!(NSThread), isMainThread] } {
|
||||
panic!("Event queued from different thread: {:#?}", wrapper);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue