mirror of
https://github.com/mpv-player/mpv
synced 2025-01-28 18:53:02 +00:00
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:
parent
b5c7ff5192
commit
c90770493c
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user