gpui: Implement window_handle and display_handle for wayland platform (#28152)
This PR implements the previously unimplemented window_handle and display_handle methods in the wayland platform. It also exposes the display_handle method through the Window struct. Release Notes: - N/A
This commit is contained in:
parent
fe1b36671d
commit
40c91d5df0
4 changed files with 29 additions and 3 deletions
|
@ -25,7 +25,7 @@ use derive_more::{Deref, DerefMut};
|
|||
use futures::FutureExt;
|
||||
use futures::channel::oneshot;
|
||||
use parking_lot::RwLock;
|
||||
use raw_window_handle::{HandleError, HasWindowHandle};
|
||||
use raw_window_handle::{HandleError, HasDisplayHandle, HasWindowHandle};
|
||||
use refineable::Refineable;
|
||||
use slotmap::SlotMap;
|
||||
use smallvec::SmallVec;
|
||||
|
@ -4428,6 +4428,14 @@ impl HasWindowHandle for Window {
|
|||
}
|
||||
}
|
||||
|
||||
impl HasDisplayHandle for Window {
|
||||
fn display_handle(
|
||||
&self,
|
||||
) -> std::result::Result<raw_window_handle::DisplayHandle<'_>, HandleError> {
|
||||
self.platform_window.display_handle()
|
||||
}
|
||||
}
|
||||
|
||||
/// An identifier for an [`Element`](crate::Element).
|
||||
///
|
||||
/// Can be constructed with a string, a number, or both, as well
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue