changeset 16975:3876c807d36c

Generate double-click mouse events.
author joey
date Fri, 11 Nov 2005 13:26:24 +0000
parents 62d979592493
children 21640a82b62f
files libvo/vo_directx.c
diffstat 1 files changed, 29 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_directx.c	Fri Nov 11 13:25:48 2005 +0000
+++ b/libvo/vo_directx.c	Fri Nov 11 13:26:24 2005 +0000
@@ -976,6 +976,24 @@
 				mplayer_put_key(MOUSE_BTN2);
 			break;
 		}
+		case WM_LBUTTONDBLCLK:
+		{
+			if(!vo_nomouse_input)
+				mplayer_put_key(MOUSE_BTN0_DBL);
+			break;
+		}
+		case WM_MBUTTONDBLCLK:
+		{
+			if(!vo_nomouse_input)
+				mplayer_put_key(MOUSE_BTN1_DBL);
+			break;
+		}
+		case WM_RBUTTONDBLCLK:
+		{
+			if(!vo_nomouse_input)
+				mplayer_put_key(MOUSE_BTN2_DBL);
+			break;
+		}
         case WM_MOUSEWHEEL:
 		{
 			if (vo_nomouse_input)
@@ -997,6 +1015,16 @@
 				mplayer_put_key(MOUSE_BTN6);
 			break;
 		}
+        case WM_XBUTTONDBLCLK:
+		{
+			if (vo_nomouse_input)
+				break;
+			if (HIWORD(wParam) == 1)
+				mplayer_put_key(MOUSE_BTN5_DBL);
+			else
+				mplayer_put_key(MOUSE_BTN6_DBL);
+			break;
+		}
 		
     }
 	return DefWindowProc(hWnd, message, wParam, lParam);
@@ -1029,7 +1057,7 @@
     windowcolor = vo_colorkey;
     colorbrush = CreateSolidBrush(windowcolor);
     blackbrush = (HBRUSH)GetStockObject(BLACK_BRUSH);
-    wc.style         =  CS_HREDRAW | CS_VREDRAW;
+    wc.style         =  CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
     wc.lpfnWndProc   =  WndProc;
     wc.cbClsExtra    =  0;
     wc.cbWndExtra    =  0;