From fe77a55a67d4115cf2bbf8ca914da43e519e5117 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sat, 8 Oct 2016 09:18:00 +0200 Subject: [PATCH] Fix WindowExt implemented on the wrong Window --- src/os/macos.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/os/macos.rs b/src/os/macos.rs index 31e29d0d..d77c64f4 100644 --- a/src/os/macos.rs +++ b/src/os/macos.rs @@ -18,6 +18,18 @@ pub trait WindowExt { fn get_nsview(&self) -> *mut c_void; } +impl WindowExt for Window { + #[inline] + fn get_nswindow(&self) -> *mut c_void { + self.window.get_nswindow() + } + + #[inline] + fn get_nsview(&self) -> *mut c_void { + self.window.get_nsview() + } +} + /// Corresponds to `NSApplicationActivationPolicy`. #[derive(Debug, Clone, Copy, PartialEq)] pub enum ActivationPolicy {