wayland: add WindowExtWayland::xdg_toplevel

Fixes #4068.
This commit is contained in:
Putta Khunchalee
2025-04-29 13:31:49 +09:00
committed by GitHub
parent c8579a1882
commit 078c4c0c4f
3 changed files with 22 additions and 2 deletions

View File

@@ -1,5 +1,7 @@
//! The Wayland window.
use std::ffi::c_void;
use std::ptr::NonNull;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Arc, Mutex};
@@ -214,6 +216,10 @@ impl Window {
window_events_sink,
})
}
pub(crate) fn xdg_toplevel(&self) -> Option<NonNull<c_void>> {
NonNull::new(self.window.xdg_toplevel().id().as_ptr().cast())
}
}
impl Window {