Fix events not being emitted during modal loops on macOS (#1173)

This commit is contained in:
Aleksi Juvani 2019-09-18 05:49:29 +03:00 committed by Osspial
parent d35ee0d580
commit 695547f4ca
4 changed files with 4 additions and 30 deletions

View file

@ -4,7 +4,6 @@ use crate::platform_impl::platform::{app_state::AppState, ffi};
#[link(name = "CoreFoundation", kind = "framework")]
extern "C" {
pub static kCFRunLoopDefaultMode: CFRunLoopMode;
pub static kCFRunLoopCommonModes: CFRunLoopMode;
pub fn CFRunLoopGetMain() -> CFRunLoopRef;
@ -162,7 +161,7 @@ impl RunLoop {
handler,
ptr::null_mut(),
);
CFRunLoopAddObserver(self.0, observer, kCFRunLoopDefaultMode);
CFRunLoopAddObserver(self.0, observer, kCFRunLoopCommonModes);
}
}