From 02f78d5eb03670bc07f615ad629e1ec03959be14 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 8 Oct 2015 07:30:10 +0200 Subject: Refactored EventHandler and friends. --- plugingui/nativewindow_x11.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugingui/nativewindow_x11.cc') diff --git a/plugingui/nativewindow_x11.cc b/plugingui/nativewindow_x11.cc index cb6cf73..4d91b32 100644 --- a/plugingui/nativewindow_x11.cc +++ b/plugingui/nativewindow_x11.cc @@ -334,8 +334,8 @@ GUI::Event *GUI::NativeWindowX11::getNextEvent() e->window_id = xe.xbutton.window; e->x = xe.xbutton.x; e->y = xe.xbutton.y; - e->button = 0; - e->direction = xe.type == ButtonPress?1:-1; + e->button = ButtonEvent::Left; + e->direction = (xe.type == ButtonPress) ? ButtonEvent::Down : ButtonEvent::Up; e->doubleclick = xe.type == ButtonPress && (xe.xbutton.time - last_click) < 200; @@ -371,7 +371,7 @@ GUI::Event *GUI::NativeWindowX11::getNextEvent() } e->text.append(buf, sz); - e->direction = xe.type == KeyPress?1:-1; + e->direction = (xe.type == KeyPress) ? KeyEvent::Down : KeyEvent::Up; event = e; } -- cgit v1.2.3