aboutsummaryrefslogtreecommitdiffstats
path: root/src/win.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/win.c')
-rw-r--r--src/win.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/win.c b/src/win.c
index c7a95d5..cc461c1 100644
--- a/src/win.c
+++ b/src/win.c
@@ -688,6 +688,13 @@ handleMessage(PuglView* view, UINT message, WPARAM wParam, LPARAM lParam)
case WM_RBUTTONDOWN:
initMouseEvent(&event, view, 1, true, lParam);
break;
+ case WM_XBUTTONDOWN:
+ if (GET_XBUTTON_WPARAM(wParam) == XBUTTON1) {
+ initMouseEvent(&event, view, 3, true, lParam);
+ } else {
+ initMouseEvent(&event, view, 4, true, lParam);
+ }
+ break;
case WM_LBUTTONUP:
initMouseEvent(&event, view, 0, false, lParam);
break;
@@ -697,6 +704,13 @@ handleMessage(PuglView* view, UINT message, WPARAM wParam, LPARAM lParam)
case WM_RBUTTONUP:
initMouseEvent(&event, view, 1, false, lParam);
break;
+ case WM_XBUTTONUP:
+ if (GET_XBUTTON_WPARAM(wParam) == XBUTTON1) {
+ initMouseEvent(&event, view, 3, false, lParam);
+ } else {
+ initMouseEvent(&event, view, 4, false, lParam);
+ }
+ break;
case WM_MOUSEWHEEL:
initScrollEvent(&event, view, lParam);
event.scroll.dy = GET_WHEEL_DELTA_WPARAM(wParam) / (double)WHEEL_DELTA;