From e29678dae684fc75acc2d02b878317bb55539c9e Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 30 Jan 2018 12:38:56 +0100 Subject: [PATCH] wineandroid: Handle additional mouse event types. Signed-off-by: Alexandre Julliard --- dlls/wineandroid.drv/window.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c index 22e21815d6c..7d2049d57b7 100644 --- a/dlls/wineandroid.drv/window.c +++ b/dlls/wineandroid.drv/window.c @@ -285,9 +285,12 @@ jboolean motion_event( JNIEnv *env, jobject obj, jint win, jint action, jint x, if (!( mask == AMOTION_EVENT_ACTION_DOWN || mask == AMOTION_EVENT_ACTION_UP || + mask == AMOTION_EVENT_ACTION_CANCEL || mask == AMOTION_EVENT_ACTION_SCROLL || mask == AMOTION_EVENT_ACTION_MOVE || - mask == AMOTION_EVENT_ACTION_HOVER_MOVE )) + mask == AMOTION_EVENT_ACTION_HOVER_MOVE || + mask == AMOTION_EVENT_ACTION_BUTTON_PRESS || + mask == AMOTION_EVENT_ACTION_BUTTON_RELEASE )) return JNI_FALSE; prev_state = InterlockedExchange( &button_state, state ); @@ -304,6 +307,7 @@ jboolean motion_event( JNIEnv *env, jobject obj, jint win, jint action, jint x, switch (action & AMOTION_EVENT_ACTION_MASK) { case AMOTION_EVENT_ACTION_DOWN: + case AMOTION_EVENT_ACTION_BUTTON_PRESS: if ((state & ~prev_state) & AMOTION_EVENT_BUTTON_PRIMARY) data.motion.input.u.mi.dwFlags |= MOUSEEVENTF_LEFTDOWN; if ((state & ~prev_state) & AMOTION_EVENT_BUTTON_SECONDARY) @@ -314,6 +318,8 @@ jboolean motion_event( JNIEnv *env, jobject obj, jint win, jint action, jint x, data.motion.input.u.mi.dwFlags |= MOUSEEVENTF_LEFTDOWN; break; case AMOTION_EVENT_ACTION_UP: + case AMOTION_EVENT_ACTION_CANCEL: + case AMOTION_EVENT_ACTION_BUTTON_RELEASE: if ((prev_state & ~state) & AMOTION_EVENT_BUTTON_PRIMARY) data.motion.input.u.mi.dwFlags |= MOUSEEVENTF_LEFTUP; if ((prev_state & ~state) & AMOTION_EVENT_BUTTON_SECONDARY)