From 1b608b39af87aed1829423c146f6fc9917c46376 Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Fri, 5 Jan 2024 18:17:44 -0800 Subject: [PATCH] Removing direct winit access This was a holdover while I was still implementing the PlatformWindow interface. Cushy widgets shouldn't be able to access winit directly, otherwise they could cause unwanted effects when not running in a standalone Cushy app but rather embedded in a game. --- src/window.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/window.rs b/src/window.rs index 710e712..f47d4cb 100644 --- a/src/window.rs +++ b/src/window.rs @@ -201,8 +201,6 @@ impl PlatformWindowImplementation for kludgine::app::Window<'_, WindowCommand> { pub trait PlatformWindow { /// Marks the window to close as soon as possible. fn close(&mut self); - /// Returns the underlying `winit` window, if one exists. - fn winit(&self) -> Option<&winit::window::Window>; /// Returns a handle for the window. fn handle(&self) -> WindowHandle; /// Returns the unique id of the [`Kludgine`] instance used by this window. @@ -362,10 +360,6 @@ where self.window.close(); } - fn winit(&self) -> Option<&winit::window::Window> { - self.window.winit() - } - fn handle(&self) -> WindowHandle { self.window.handle(self.invalidation_status.clone()) }