diff options
author | fvogel <fvogelnew1@free.fr> | 2019-07-21 08:50:46 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2019-07-21 08:50:46 (GMT) |
commit | af74667a3164ac1633298b6881a27e4ecd070c38 (patch) | |
tree | 120f32af0ae98506cb01bdebcfd1546ec6e3c4fb /win/tkWinX.c | |
parent | 41bb9d8273752f7b46aa4658ff4efeb7cc27f2b6 (diff) | |
download | tk-af74667a3164ac1633298b6881a27e4ecd070c38.zip tk-af74667a3164ac1633298b6881a27e4ecd070c38.tar.gz tk-af74667a3164ac1633298b6881a27e4ecd070c38.tar.bz2 |
Fix [1fb7af623a]: Support for buttons 4 and 5 is missing for Windows. Patch from Christopher Chavez
Diffstat (limited to 'win/tkWinX.c')
-rw-r--r-- | win/tkWinX.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/win/tkWinX.c b/win/tkWinX.c index cfb19d4..7aa49ab 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -930,9 +930,12 @@ Tk_TranslateWinEvent( case WM_MBUTTONDBLCLK: case WM_RBUTTONDOWN: case WM_RBUTTONDBLCLK: + case WM_XBUTTONDOWN: + case WM_XBUTTONDBLCLK: case WM_LBUTTONUP: case WM_MBUTTONUP: case WM_RBUTTONUP: + case WM_XBUTTONUP: case WM_MOUSEMOVE: Tk_PointerEvent(hwnd, (short) LOWORD(lParam), (short) HIWORD(lParam)); return 1; @@ -1783,6 +1786,14 @@ TkWinResendEvent( msg = WM_RBUTTONDOWN; wparam = MK_RBUTTON; break; + case Button4: + msg = WM_XBUTTONDOWN; + wparam = MAKEWPARAM(MK_XBUTTON1, XBUTTON1); + break; + case Button5: + msg = WM_XBUTTONDOWN; + wparam = MAKEWPARAM(MK_XBUTTON2, XBUTTON2); + break; default: return 0; } @@ -1796,6 +1807,12 @@ TkWinResendEvent( if (eventPtr->xbutton.state & Button3Mask) { wparam |= MK_RBUTTON; } + if (eventPtr->xbutton.state & Button4Mask) { + wparam |= MK_XBUTTON1; + } + if (eventPtr->xbutton.state & Button5Mask) { + wparam |= MK_XBUTTON2; + } if (eventPtr->xbutton.state & ShiftMask) { wparam |= MK_SHIFT; } |