aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-02-05 18:37:53 +0100
committertomaka <pierre.krieger1708@gmail.com>2015-02-05 18:37:53 +0100
commit6b52bf95a4a5d0f6c1dbf5ac49036dbf7d9c1858 (patch)
tree762b32990ce7f800bf56c7952ac6a43b8d3978e5 /src/x11
parenta6a43dbe658554c3259f73f5dc3c498461341b9f (diff)
parentb2367fe2e6bded2c36d1b5e4f0dc595586b4bd08 (diff)
downloadglutin-6b52bf95a4a5d0f6c1dbf5ac49036dbf7d9c1858.tar.gz
glutin-6b52bf95a4a5d0f6c1dbf5ac49036dbf7d9c1858.zip
Merge pull request #254 from aepsil0n/mousebutton-renaming
Rename enum variants of MouseButton
Diffstat (limited to 'src/x11')
-rw-r--r--src/x11/window/mod.rs8
1 files changed, 4 insertions, 4 deletions
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