fixup macos compilation
This commit is contained in:
1 parent
96c9633539
commit
fa54f02b27
3 files changed
+3
-13
No files matched your search
@@ -4,16 +4,13 @@ use crate::spawn::*;
|
||||
use crate::tasks::{Task, Tasks};
|
||||
use cocoa::appkit::{NSApp, NSApplication, NSApplicationActivationPolicyRegular};
|
||||
use cocoa::base::{id, nil};
|
||||
use core_foundation::runloop::*;
|
||||
use failure::Fallible;
|
||||
use objc::*;
|
||||
use promise::{BasicExecutor, SpawnFunc};
|
||||
use promise::BasicExecutor;
|
||||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::VecDeque;
|
||||
use std::rc::Rc;
|
||||
use std::sync::atomic::AtomicUsize;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
pub struct Connection {
|
||||
ns_app: id,
|
||||
|
||||
@@ -293,15 +293,6 @@ fn key_modifiers(flags: NSEventModifierFlags) -> Modifiers {
|
||||
}
|
||||
|
||||
impl WindowView {
|
||||
fn view_id(&self) -> id {
|
||||
let inner = self.inner.borrow_mut();
|
||||
inner.view_id.as_ref().map(|w| *w.load()).unwrap_or(nil)
|
||||
}
|
||||
|
||||
fn window_id(&self) -> id {
|
||||
unsafe { msg_send![self.view_id(), window] }
|
||||
}
|
||||
|
||||
extern "C" fn dealloc(this: &mut Object, _sel: Sel) {
|
||||
Self::drop_inner(this);
|
||||
unsafe {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#[cfg(windows)]
|
||||
use crate::os::windows::event::EventHandle;
|
||||
#[cfg(target_os = "macos")]
|
||||
use core_foundation::runloop::*;
|
||||
use failure::Fallible;
|
||||
#[cfg(all(unix, not(target_os = "macos")))]
|
||||
use filedescriptor::{FileDescriptor, Pipe};
|
||||
|
||||
Reference in new issue
Block a user