| Date: Wed, 9 Jun 2004 14:01:30 +0000
Add buttons 4 and 5 (scrolling on X).
Diffstat:
M src/libdraw/x11-itrans.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
--- |
| t@@ -220,6 +220,12 @@ _xtoplan9mouse(XDisplay *xd, XEvent *e, Mouse *m)
case 3:
s |= Button3Mask;
break;
+ case 4:
+ s |= Button4Mask;
+ break;
+ case 5:
+ s |= Button5Mask;
+ break;
}
break;
case ButtonRelease:
t@@ -238,6 +244,12 @@ _xtoplan9mouse(XDisplay *xd, XEvent *e, Mouse *m)
case 3:
s &= ~Button3Mask;
break;
+ case 4:
+ s &= ~Button4Mask;
+ break;
+ case 5:
+ s &= ~Button5Mask;
+ break;
}
break;
t@@ -260,7 +272,10 @@ _xtoplan9mouse(XDisplay *xd, XEvent *e, Mouse *m)
m->buttons |= 2;
if(s & Button3Mask)
m->buttons |= 4;
-
+ if(s & Button4Mask)
+ m->buttons |= 8;
+ if(s & Button5Mask)
+ m->buttons |= 16;
return 0;
}
|