diff options
-rw-r--r-- | src/libdraw/x11-itrans.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/libdraw/x11-itrans.c b/src/libdraw/x11-itrans.c index fcecb263..ecc0f698 100644 --- a/src/libdraw/x11-itrans.c +++ b/src/libdraw/x11-itrans.c @@ -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: @@ -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; @@ -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; } |