mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 06:11:30 +11:00
wayland: Fix drop order for display (#326)
This commit is contained in:
parent
760e588627
commit
58181dbff9
|
@ -55,8 +55,6 @@ impl EventsLoopSink {
|
|||
}
|
||||
|
||||
pub struct EventsLoop {
|
||||
// The wayland display
|
||||
pub display: Arc<wl_display::WlDisplay>,
|
||||
// The Event Queue
|
||||
pub evq: RefCell<EventQueue>,
|
||||
// our sink, shared with some handlers, buffering the events
|
||||
|
@ -70,7 +68,9 @@ pub struct EventsLoop {
|
|||
// the ctxt
|
||||
pub ctxt_token: StateToken<StateContext>,
|
||||
// a cleanup switch to prune dead windows
|
||||
pub cleanup_needed: Arc<Mutex<bool>>
|
||||
pub cleanup_needed: Arc<Mutex<bool>>,
|
||||
// The wayland display
|
||||
pub display: Arc<wl_display::WlDisplay>,
|
||||
}
|
||||
|
||||
// A handle that can be sent across threads and used to wake up the `EventsLoop`.
|
||||
|
|
|
@ -12,13 +12,13 @@ use super::wayland_window::{DecoratedSurface, DecoratedSurfaceImplementation};
|
|||
use super::event_loop::StateContext;
|
||||
|
||||
pub struct Window {
|
||||
display: Arc<wl_display::WlDisplay>,
|
||||
surface: wl_surface::WlSurface,
|
||||
decorated: Arc<Mutex<DecoratedSurface>>,
|
||||
monitors: Arc<Mutex<MonitorList>>,
|
||||
ready: Arc<Mutex<bool>>,
|
||||
size: Arc<Mutex<(u32, u32)>>,
|
||||
kill_switch: (Arc<Mutex<bool>>, Arc<Mutex<bool>>),
|
||||
display: Arc<wl_display::WlDisplay>,
|
||||
}
|
||||
|
||||
impl Window {
|
||||
|
@ -309,4 +309,4 @@ fn surface_impl() -> wl_surface::Implementation<(StateToken<StateContext>, Arc<M
|
|||
guard.monitors.retain(|m| !Arc::ptr_eq(&m.info, &monitor.info));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue