Alexandre Julliard : winex11: Add support for X11 mouse buttons 8 and 9.

Alexandre Julliard julliard at winehq.org
Fri May 23 05:45:35 CDT 2008


Module: wine
Branch: master
Commit: 62b0e91c38510406c2f01f0a2f527bc096c0a57b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=62b0e91c38510406c2f01f0a2f527bc096c0a57b

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu May 22 20:45:30 2008 +0200

winex11: Add support for X11 mouse buttons 8 and 9.

---

 dlls/winex11.drv/mouse.c |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index 5ab9ea8..354f74c 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 );




More information about the wine-cvs mailing list