mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 07:03:15 -04:00
Impl Clone for EventsLoopProxy (#331)
This commit is contained in:
committed by
Victor Berger
parent
58181dbff9
commit
159364bec3
@@ -297,6 +297,7 @@ pub enum EventsLoop {
|
||||
X(x11::EventsLoop)
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub enum EventsLoopProxy {
|
||||
X(x11::EventsLoopProxy),
|
||||
Wayland(wayland::EventsLoopProxy),
|
||||
|
||||
@@ -76,6 +76,7 @@ pub struct EventsLoop {
|
||||
// A handle that can be sent across threads and used to wake up the `EventsLoop`.
|
||||
//
|
||||
// We should only try and wake up the `EventsLoop` if it still exists, so we hold Weak ptrs.
|
||||
#[derive(Clone)]
|
||||
pub struct EventsLoopProxy {
|
||||
display: Weak<wl_display::WlDisplay>,
|
||||
pending_wakeup: Weak<AtomicBool>,
|
||||
|
||||
@@ -43,6 +43,7 @@ pub struct EventsLoop {
|
||||
wakeup_dummy_window: ffi::Window,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct EventsLoopProxy {
|
||||
pending_wakeup: Weak<AtomicBool>,
|
||||
display: Weak<XConnection>,
|
||||
|
||||
Reference in New Issue
Block a user