From 58181dbff9df9722b24aef18645a367e73584594 Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Wed, 25 Oct 2017 18:28:24 +0200 Subject: [PATCH] wayland: Fix drop order for display (#326) --- src/platform/linux/wayland/event_loop.rs | 6 +++--- src/platform/linux/wayland/window.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/platform/linux/wayland/event_loop.rs b/src/platform/linux/wayland/event_loop.rs index c35cb4fe..27c4d450 100644 --- a/src/platform/linux/wayland/event_loop.rs +++ b/src/platform/linux/wayland/event_loop.rs @@ -55,8 +55,6 @@ impl EventsLoopSink { } pub struct EventsLoop { - // The wayland display - pub display: Arc, // The Event Queue pub evq: RefCell, // our sink, shared with some handlers, buffering the events @@ -70,7 +68,9 @@ pub struct EventsLoop { // the ctxt pub ctxt_token: StateToken, // a cleanup switch to prune dead windows - pub cleanup_needed: Arc> + pub cleanup_needed: Arc>, + // The wayland display + pub display: Arc, } // A handle that can be sent across threads and used to wake up the `EventsLoop`. diff --git a/src/platform/linux/wayland/window.rs b/src/platform/linux/wayland/window.rs index fb73a3e7..eb48819b 100644 --- a/src/platform/linux/wayland/window.rs +++ b/src/platform/linux/wayland/window.rs @@ -12,13 +12,13 @@ use super::wayland_window::{DecoratedSurface, DecoratedSurfaceImplementation}; use super::event_loop::StateContext; pub struct Window { - display: Arc, surface: wl_surface::WlSurface, decorated: Arc>, monitors: Arc>, ready: Arc>, size: Arc>, kill_switch: (Arc>, Arc>), + display: Arc, } impl Window { @@ -309,4 +309,4 @@ fn surface_impl() -> wl_surface::Implementation<(StateToken, Arc