[MPlayer-cvslog] r24986 - trunk/libvo/vo_quartz.c
ulion
subversion at mplayerhq.hu
Wed Nov 7 02:44:42 CET 2007
Author: ulion
Date: Wed Nov 7 02:44:41 2007
New Revision: 24986
Log:
Handle mouse up event to get double click support from mp_fifo.
Modified:
trunk/libvo/vo_quartz.c
Modified: trunk/libvo/vo_quartz.c
==============================================================================
--- trunk/libvo/vo_quartz.c (original)
+++ trunk/libvo/vo_quartz.c Wed Nov 7 02:44:41 2007
@@ -308,6 +308,7 @@ static OSStatus MouseEventHandler(EventH
break;
case kEventMouseDown:
+ case kEventMouseUp:
{
EventMouseButton button;
short part;
@@ -317,7 +318,26 @@ static OSStatus MouseEventHandler(EventH
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(EventH
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(EventH
}
break;
- case kEventMouseUp:
- break;
-
case kEventMouseDragged:
break;
More information about the MPlayer-cvslog
mailing list