From b2367fe2e6bded2c36d1b5e4f0dc595586b4bd08 Mon Sep 17 00:00:00 2001 From: Eduard Bopp Date: Thu, 5 Feb 2015 16:52:53 +0100 Subject: Rename enum variants of MouseButton With enums that are namespaced by default, it seems reasonable to be less redundant in the variant naming here. --- src/x11/window/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/x11') diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs index d412ce0..74145f3 100644 --- a/src/x11/window/mod.rs +++ b/src/x11/window/mod.rs @@ -594,16 +594,16 @@ impl Window { ffi::ButtonPress | ffi::ButtonRelease => { use events::Event::{MouseInput, MouseWheel}; use events::ElementState::{Pressed, Released}; - use events::MouseButton::{LeftMouseButton, RightMouseButton, MiddleMouseButton}; + use events::MouseButton::{Left, Right, Middle}; let event: &ffi::XButtonEvent = unsafe { mem::transmute(&xev) }; let state = if xev.type_ == ffi::ButtonPress { Pressed } else { Released }; let button = match event.button { - ffi::Button1 => Some(LeftMouseButton), - ffi::Button2 => Some(MiddleMouseButton), - ffi::Button3 => Some(RightMouseButton), + ffi::Button1 => Some(Left), + ffi::Button2 => Some(Middle), + ffi::Button3 => Some(Right), ffi::Button4 => { events.push_back(MouseWheel(1)); None -- cgit v1.2.3