From 7b3e9347ba105aa2a2015de5a4b457ebb55043fa Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 9 Mar 2018 21:21:23 +0000 Subject: Android: move Android specific platform events to FL/android.H git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12724 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/drivers/Android/Fl_Android_Screen_Driver.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/drivers/Android/Fl_Android_Screen_Driver.cxx') diff --git a/src/drivers/Android/Fl_Android_Screen_Driver.cxx b/src/drivers/Android/Fl_Android_Screen_Driver.cxx index f3e7ddc9c..9c2d830fd 100644 --- a/src/drivers/Android/Fl_Android_Screen_Driver.cxx +++ b/src/drivers/Android/Fl_Android_Screen_Driver.cxx @@ -116,10 +116,10 @@ int Fl_Android_Screen_Driver::handle_keyboard_event(AInputEvent *event) int Fl_Android_Screen_Driver::handle_mouse_event(AInputEvent *event) { - Fl::e_x = Fl::e_x_root = AMotionEvent_getX(event, 0) * 600 / - ANativeWindow_getWidth(Fl_Android_Application::native_window()); - Fl::e_y = Fl::e_y_root = AMotionEvent_getY(event, 0) * 800 / - ANativeWindow_getHeight(Fl_Android_Application::native_window()); + Fl::e_x = Fl::e_x_root = (int)(AMotionEvent_getX(event, 0) * 600 / + ANativeWindow_getWidth(Fl_Android_Application::native_window())); + Fl::e_y = Fl::e_y_root = (int)(AMotionEvent_getY(event, 0) * 800 / + ANativeWindow_getHeight(Fl_Android_Application::native_window())); Fl::e_state = FL_BUTTON1; Fl::e_keysym = FL_Button + 1; if (AMotionEvent_getAction(event) == AMOTION_EVENT_ACTION_DOWN) { -- cgit v1.2.3