From f99ee45552936f21c8d2cd8b34531b02cb6cd607 Mon Sep 17 00:00:00 2001 From: Daniel Collin Date: Thu, 13 Aug 2020 20:15:07 +0200 Subject: [PATCH] Test fix for get_keys_released on Wayland --- src/os/posix/mod.rs | 2 +- src/os/posix/wayland.rs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/os/posix/mod.rs b/src/os/posix/mod.rs index b9c67cc..d1428b0 100644 --- a/src/os/posix/mod.rs +++ b/src/os/posix/mod.rs @@ -224,7 +224,7 @@ impl Window { #[cfg(feature = "x11")] Window::X11(ref w) => w.get_keys_released(), #[cfg(feature = "wayland")] - Window::Wayland(ref _w) => unimplemented!(), + Window::Wayland(ref w) => w.get_keys_released(), } } diff --git a/src/os/posix/wayland.rs b/src/os/posix/wayland.rs index c87c261..b637c56 100644 --- a/src/os/posix/wayland.rs +++ b/src/os/posix/wayland.rs @@ -597,6 +597,10 @@ impl Window { self.key_handler.get_keys_pressed(repeat) } + pub fn get_keys_released(&self) -> Option> { + self.key_handler.get_keys_released() + } + pub fn get_mouse_pos(&self, mode: MouseMode) -> Option<(f32, f32)> { mouse_handler::get_pos( mode,