wineandroid: Handle additional mouse event types.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a8a74134e8
commit
e29678dae6
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue