From 62b0e91c38510406c2f01f0a2f527bc096c0a57b Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 22 May 2008 20:45:30 +0200 Subject: [PATCH] winex11: Add support for X11 mouse buttons 8 and 9. --- dlls/winex11.drv/mouse.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 5ab9ea8975d..354f74ce849 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -57,7 +57,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(cursor); #define Button7Mask (1<<14) #endif -#define NB_BUTTONS 7 /* Windows can handle 5 buttons and the wheel too */ +#define NB_BUTTONS 9 /* Windows can handle 5 buttons and the wheel too */ static const UINT button_down_flags[NB_BUTTONS] = { @@ -66,6 +66,8 @@ static const UINT button_down_flags[NB_BUTTONS] = MOUSEEVENTF_RIGHTDOWN, MOUSEEVENTF_WHEEL, MOUSEEVENTF_WHEEL, + MOUSEEVENTF_XDOWN, /* FIXME: horizontal wheel */ + MOUSEEVENTF_XDOWN, MOUSEEVENTF_XDOWN, MOUSEEVENTF_XDOWN }; @@ -78,6 +80,8 @@ static const UINT button_up_flags[NB_BUTTONS] = 0, 0, MOUSEEVENTF_XUP, + MOUSEEVENTF_XUP, + MOUSEEVENTF_XUP, MOUSEEVENTF_XUP }; @@ -1038,6 +1042,12 @@ void X11DRV_ButtonPress( HWND hwnd, XEvent *xev ) case 6: wData = XBUTTON2; break; + case 7: + wData = XBUTTON1; + break; + case 8: + wData = XBUTTON2; + break; } update_mouse_state( hwnd, event->window, event->x, event->y, event->state, &pt ); @@ -1068,6 +1078,12 @@ void X11DRV_ButtonRelease( HWND hwnd, XEvent *xev ) case 6: wData = XBUTTON2; break; + case 7: + wData = XBUTTON1; + break; + case 8: + wData = XBUTTON2; + break; } update_mouse_state( hwnd, event->window, event->x, event->y, event->state, &pt );