wayland: add WindowExtWayland::xdg_toplevel

Fixes #4068.
This commit is contained in:
Putta Khunchalee
2025-04-29 13:31:49 +09:00
committed by Kirill Chibisov
parent 53bbe6c273
commit 847511672a
3 changed files with 29 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};
@@ -223,6 +225,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 {