wayland: Fix drop order for display (#326)

This commit is contained in:
Victor Berger 2017-10-25 18:28:24 +02:00 committed by GitHub
parent 760e588627
commit 58181dbff9
2 changed files with 5 additions and 5 deletions

View file

@ -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`.

View file

@ -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 {