Commit e29678da authored by Alexandre Julliard's avatar Alexandre Julliard

wineandroid: Handle additional mouse event types.

parent a8a74134
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment