wineandroid: Handle additional mouse event types.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2018-01-30 12:38:56 +01:00
parent a8a74134e8
commit e29678dae6
1 changed files with 7 additions and 1 deletions

View File

@ -285,9 +285,12 @@ jboolean motion_event( JNIEnv *env, jobject obj, jint win, jint action, jint x,
if (!( mask == AMOTION_EVENT_ACTION_DOWN || if (!( mask == AMOTION_EVENT_ACTION_DOWN ||
mask == AMOTION_EVENT_ACTION_UP || mask == AMOTION_EVENT_ACTION_UP ||
mask == AMOTION_EVENT_ACTION_CANCEL ||
mask == AMOTION_EVENT_ACTION_SCROLL || mask == AMOTION_EVENT_ACTION_SCROLL ||
mask == AMOTION_EVENT_ACTION_MOVE || 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; return JNI_FALSE;
prev_state = InterlockedExchange( &button_state, state ); 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) switch (action & AMOTION_EVENT_ACTION_MASK)
{ {
case AMOTION_EVENT_ACTION_DOWN: case AMOTION_EVENT_ACTION_DOWN:
case AMOTION_EVENT_ACTION_BUTTON_PRESS:
if ((state & ~prev_state) & AMOTION_EVENT_BUTTON_PRIMARY) if ((state & ~prev_state) & AMOTION_EVENT_BUTTON_PRIMARY)
data.motion.input.u.mi.dwFlags |= MOUSEEVENTF_LEFTDOWN; data.motion.input.u.mi.dwFlags |= MOUSEEVENTF_LEFTDOWN;
if ((state & ~prev_state) & AMOTION_EVENT_BUTTON_SECONDARY) 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; data.motion.input.u.mi.dwFlags |= MOUSEEVENTF_LEFTDOWN;
break; break;
case AMOTION_EVENT_ACTION_UP: case AMOTION_EVENT_ACTION_UP:
case AMOTION_EVENT_ACTION_CANCEL:
case AMOTION_EVENT_ACTION_BUTTON_RELEASE:
if ((prev_state & ~state) & AMOTION_EVENT_BUTTON_PRIMARY) if ((prev_state & ~state) & AMOTION_EVENT_BUTTON_PRIMARY)
data.motion.input.u.mi.dwFlags |= MOUSEEVENTF_LEFTUP; data.motion.input.u.mi.dwFlags |= MOUSEEVENTF_LEFTUP;
if ((prev_state & ~state) & AMOTION_EVENT_BUTTON_SECONDARY) if ((prev_state & ~state) & AMOTION_EVENT_BUTTON_SECONDARY)