diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e972bed..13a8b4c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Added `is_maximized` method to `Window`. - On Windows, fix bug where clicking the decoration bar would make the cursor blink. - On Windows, fix bug causing newly created windows to erroneously display the "wait" (spinning) cursor. +- On macOS, wake up the event loop immediately when a redraw is requested. - On Windows, change the default window size (1024x768) to match the default on other desktop platforms (800x600). - On Windows, fix bug causing mouse capture to not be released. - On Windows, fix fullscreen not preserving minimized/maximized state. diff --git a/src/platform_impl/macos/app_state.rs b/src/platform_impl/macos/app_state.rs index b72cc57b..fb67b4d6 100644 --- a/src/platform_impl/macos/app_state.rs +++ b/src/platform_impl/macos/app_state.rs @@ -25,7 +25,7 @@ use crate::{ platform_impl::platform::{ event::{EventProxy, EventWrapper}, event_loop::{post_dummy_event, PanicInfo}, - observer::EventLoopWaker, + observer::{CFRunLoopGetMain, CFRunLoopWakeUp, EventLoopWaker}, util::{IdRef, Never}, window::get_window_id, }, @@ -321,6 +321,10 @@ impl AppState { if !pending_redraw.contains(&window_id) { pending_redraw.push(window_id); } + unsafe { + let rl = CFRunLoopGetMain(); + CFRunLoopWakeUp(rl); + } } pub fn queue_event(wrapper: EventWrapper) {