diff --git a/crates/gpui/src/window.rs b/crates/gpui/src/window.rs index e0e473974db2b08694c3eeb7a9574037b0d2ecbc..7639f5e676c25a33aac90083f99f97dfae583625 100644 --- a/crates/gpui/src/window.rs +++ b/crates/gpui/src/window.rs @@ -23,6 +23,7 @@ use futures::FutureExt; #[cfg(target_os = "macos")] use media::core_video::CVImageBuffer; use parking_lot::RwLock; +use raw_window_handle::{HandleError, HasWindowHandle}; use refineable::Refineable; use slotmap::SlotMap; use smallvec::SmallVec; @@ -3943,6 +3944,12 @@ impl AnyWindowHandle { } } +impl HasWindowHandle for Window { + fn window_handle(&self) -> Result, HandleError> { + self.platform_window.window_handle() + } +} + /// An identifier for an [`Element`](crate::Element). /// /// Can be constructed with a string, a number, or both, as well