summaryrefslogtreecommitdiff
path: root/plugingui/nativewindow_x11.cc
diff options
context:
space:
mode:
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;
}