mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 06:41:31 +11:00
wayland: Implement wakeup_event_loop()
This commit is contained in:
parent
db6b4606a1
commit
0663269482
|
@ -12,12 +12,17 @@ use super::wayland_window;
|
||||||
use super::wayland_window::DecoratedSurface;
|
use super::wayland_window::DecoratedSurface;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct WindowProxy;
|
pub struct WindowProxy {
|
||||||
|
ctxt: Arc<WaylandContext>,
|
||||||
|
eviter: Arc<Mutex<VecDeque<Event>>>,
|
||||||
|
}
|
||||||
|
|
||||||
impl WindowProxy {
|
impl WindowProxy {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn wakeup_event_loop(&self) {
|
pub fn wakeup_event_loop(&self) {
|
||||||
unimplemented!()
|
// Send a sync event, so that any waiting "dispatch" will return
|
||||||
|
self.ctxt.display.sync();
|
||||||
|
self.eviter.lock().unwrap().push_back(Event::Awakened);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,7 +214,10 @@ impl Window {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn create_window_proxy(&self) -> WindowProxy {
|
pub fn create_window_proxy(&self) -> WindowProxy {
|
||||||
WindowProxy
|
WindowProxy {
|
||||||
|
ctxt: self.ctxt.clone(),
|
||||||
|
eviter: self.eviter.clone()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
Loading…
Reference in a new issue