diff options
author | rsc <devnull@localhost> | 2004-06-09 14:01:30 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-06-09 14:01:30 +0000 |
commit | ff8bbc7987bd23cffd029d5968e76dbdeb67c7fa (patch) | |
tree | 64b9fb949448cf884ee78128dedaed89363c19df /src/libdraw | |
parent | 2d67e4cc561e04f247d0dda2ea942a7cfcccac5b (diff) | |
download | plan9port-ff8bbc7987bd23cffd029d5968e76dbdeb67c7fa.tar.gz plan9port-ff8bbc7987bd23cffd029d5968e76dbdeb67c7fa.tar.bz2 plan9port-ff8bbc7987bd23cffd029d5968e76dbdeb67c7fa.zip |
Add buttons 4 and 5 (scrolling on X).
Diffstat (limited to 'src/libdraw')
-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; } |