Handle mouse up event to get double click support from mp_fifo.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24986 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
ulion 2007-11-07 01:44:41 +00:00
parent b5c7ff5192
commit c90770493c
1 changed files with 23 additions and 6 deletions

View File

@ -308,6 +308,7 @@ static OSStatus MouseEventHandler(EventHandlerCallRef nextHandler, EventRef even
break;
case kEventMouseDown:
case kEventMouseUp:
{
EventMouseButton button;
short part;
@ -317,7 +318,26 @@ static OSStatus MouseEventHandler(EventHandlerCallRef nextHandler, EventRef even
GetEventParameter(event, kEventParamMouseButton, typeMouseButton, 0, sizeof(EventMouseButton), 0, &button);
part = FindWindow(mousePos,&tmpWin);
if(kind == kEventMouseUp)
{
if (part != inContent)
break;
switch(button)
{
case kEventMouseButtonPrimary:
mplayer_put_key(MOUSE_BTN0);
break;
case kEventMouseButtonSecondary:
mplayer_put_key(MOUSE_BTN1);
break;
case kEventMouseButtonTertiary:
mplayer_put_key(MOUSE_BTN2);
break;
default:result = eventNotHandledErr;break;
}
break;
}
if( (winMousePos.h > (bounds.right - 15)) && (winMousePos.v > (bounds.bottom)) )
{
if(!vo_quartz_fs)
@ -335,13 +355,13 @@ static OSStatus MouseEventHandler(EventHandlerCallRef nextHandler, EventRef even
switch(button)
{
case kEventMouseButtonPrimary:
mplayer_put_key(MOUSE_BTN0);
mplayer_put_key(MOUSE_BTN0 | MP_KEY_DOWN);
break;
case kEventMouseButtonSecondary:
mplayer_put_key(MOUSE_BTN1);
mplayer_put_key(MOUSE_BTN1 | MP_KEY_DOWN);
break;
case kEventMouseButtonTertiary:
mplayer_put_key(MOUSE_BTN2);
mplayer_put_key(MOUSE_BTN2 | MP_KEY_DOWN);
break;
default:result = eventNotHandledErr;break;
@ -350,9 +370,6 @@ static OSStatus MouseEventHandler(EventHandlerCallRef nextHandler, EventRef even
}
break;
case kEventMouseUp:
break;
case kEventMouseDragged:
break;