diff --git a/src/macos/window.rs b/src/macos/window.rs index d84de7c..30a9016 100644 --- a/src/macos/window.rs +++ b/src/macos/window.rs @@ -166,44 +166,6 @@ impl Window { window_handle } - pub fn open_as_if_parented(options: WindowOpenOptions, build: B) -> WindowHandle - where - H: WindowHandler + 'static, - B: FnOnce(&mut crate::Window) -> H, - B: Send + 'static, - { - let pool = unsafe { NSAutoreleasePool::new(nil) }; - - let scaling = match options.scale { - WindowScalePolicy::ScaleFactor(scale) => scale, - WindowScalePolicy::SystemScaleFactor => 1.0, - }; - - let window_info = WindowInfo::from_logical_size(options.size, scaling); - - let ns_view = unsafe { create_view(&options) }; - - let window = Window { - ns_app: None, - ns_window: None, - ns_view, - close_requested: false, - - #[cfg(feature = "opengl")] - gl_context: options - .gl_config - .map(|gl_config| Self::create_gl_context(None, ns_view, gl_config)), - }; - - let window_handle = Self::init(true, window, window_info, build); - - unsafe { - let () = msg_send![pool, drain]; - } - - window_handle - } - pub fn open_blocking(options: WindowOpenOptions, build: B) where H: WindowHandler + 'static, diff --git a/src/win/window.rs b/src/win/window.rs index 9378a75..e5b6cdb 100644 --- a/src/win/window.rs +++ b/src/win/window.rs @@ -565,17 +565,6 @@ impl Window<'_> { window_handle } - pub fn open_as_if_parented(options: WindowOpenOptions, build: B) -> WindowHandle - where - H: WindowHandler + 'static, - B: FnOnce(&mut crate::Window) -> H, - B: Send + 'static, - { - let (window_handle, _) = Self::open(true, null_mut(), options, build); - - window_handle - } - pub fn open_blocking(options: WindowOpenOptions, build: B) where H: WindowHandler + 'static, diff --git a/src/window.rs b/src/window.rs index f662990..57e013d 100644 --- a/src/window.rs +++ b/src/window.rs @@ -87,16 +87,6 @@ impl<'a> Window<'a> { WindowHandle::new(window_handle) } - pub fn open_as_if_parented(options: WindowOpenOptions, build: B) -> WindowHandle - where - H: WindowHandler + 'static, - B: FnOnce(&mut Window) -> H, - B: Send + 'static, - { - let window_handle = platform::Window::open_as_if_parented::(options, build); - WindowHandle::new(window_handle) - } - pub fn open_blocking(options: WindowOpenOptions, build: B) where H: WindowHandler + 'static, diff --git a/src/x11/window.rs b/src/x11/window.rs index 00e0153..4d85fe9 100644 --- a/src/x11/window.rs +++ b/src/x11/window.rs @@ -147,26 +147,6 @@ impl Window { window_handle } - pub fn open_as_if_parented(options: WindowOpenOptions, build: B) -> WindowHandle - where - H: WindowHandler + 'static, - B: FnOnce(&mut crate::Window) -> H, - B: Send + 'static, - { - let (tx, rx) = mpsc::sync_channel::(1); - - let (parent_handle, mut window_handle) = ParentHandle::new(); - - thread::spawn(move || { - Self::window_thread(None, options, build, tx.clone(), Some(parent_handle)); - }); - - let raw_window_handle = rx.recv().unwrap().unwrap(); - window_handle.raw_window_handle = Some(raw_window_handle.0); - - window_handle - } - pub fn open_blocking(options: WindowOpenOptions, build: B) where H: WindowHandler + 'static,