summaryrefslogtreecommitdiff
path: root/plugingui/nativewindow_x11.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-10-08 07:30:10 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2015-10-08 07:30:10 +0200
commit02f78d5eb03670bc07f615ad629e1ec03959be14 (patch)
tree544ce15e8aabd0b9ae4b59221db040d8ab9e7170 /plugingui/nativewindow_x11.cc
parentf8740b3195bdff33d11d4cd23cdd791aec175c5c (diff)
Refactored EventHandler and friends.
Diffstat (limited to 'plugingui/nativewindow_x11.cc')
-rw-r--r--plugingui/nativewindow_x11.cc6
1 files changed, 3 insertions, 3 deletions
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;
}