X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fx11%2Fmouse.cpp;h=b8a771786a901a73a6dd8bc2a5d238b1c0b04ba9;hb=75286abb276e0f7e7a1fb8f5a7a7c1c33ca5bcda;hp=3533d561fc17b4c325c60b06288a84b4e44fcfab;hpb=7302a061c57602203895b616bf54d96269c677c6;p=libs%2Fgui.git diff --git a/source/input/x11/mouse.cpp b/source/input/x11/mouse.cpp index 3533d56..b8a7717 100644 --- a/source/input/x11/mouse.cpp +++ b/source/input/x11/mouse.cpp @@ -1,4 +1,5 @@ #include +#include "keys.h" #include "mouse.h" namespace Msp { @@ -13,8 +14,8 @@ void Mouse::input_event(const Graphics::Window::Event &event) set_button_state(event.xevent.xbutton.button, event.xevent.type==ButtonPress, true); break; case MotionNotify: - set_axis_value(0, event.xevent.xmotion.x*2.0/window.get_width()-1.0, true); - set_axis_value(1, 1.0-event.xevent.xmotion.y*2.0/window.get_height(), true); + set_axis_value(MOUSE_X_AXIS, event.xevent.xmotion.x*2.0/window.get_width()-1.0, true); + set_axis_value(MOUSE_Y_AXIS, 1.0-event.xevent.xmotion.y*2.0/window.get_height(), true); break; } }