From 1cea6a65a44dee4d0bd85a35f8ac531017c4951f Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Sun, 16 Aug 2015 14:12:21 +0200 Subject: Update wayland backend to draw decorations. Integrate with wayland-window crate to draw decorations allowing resize & move of the window. Leaving the wayland backend as disabled until full usability is ensured. --- src/api/wayland/context.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/api/wayland/context.rs') diff --git a/src/api/wayland/context.rs b/src/api/wayland/context.rs index 1af6311..6d7df86 100644 --- a/src/api/wayland/context.rs +++ b/src/api/wayland/context.rs @@ -25,7 +25,7 @@ pub struct WaylandContext { pub compositor: Compositor, pub shell: Shell, pub seat: Seat, - pub pointer: Option>, + pointer: Option>>, keyboard: Option, windows_event_queues: Arc>>>>>, current_pointer_surface: Arc>>, @@ -196,7 +196,7 @@ impl WaylandContext { compositor: compositor, shell: shell, seat: seat, - pointer: pointer, + pointer: pointer.map(|p| Mutex::new(p)), keyboard: keyboard, windows_event_queues: windows_event_queues, current_pointer_surface: current_pointer_surface, @@ -207,9 +207,15 @@ impl WaylandContext { pub fn register_surface(&self, sid: SurfaceId, queue: Arc>>) { self.windows_event_queues.lock().unwrap().insert(sid, queue); + if let Some(ref p) = self.pointer { + p.lock().unwrap().add_handled_surface(sid); + } } pub fn deregister_surface(&self, sid: SurfaceId) { self.windows_event_queues.lock().unwrap().remove(&sid); + if let Some(ref p) = self.pointer { + p.lock().unwrap().remove_handled_surface(sid); + } } } \ No newline at end of file -- cgit v1.2.3