diff options
author | stanley lieber <stanley.lieber@gmail.com> | 2013-12-31 00:52:52 -0500 |
---|---|---|
committer | stanley lieber <stanley.lieber@gmail.com> | 2013-12-31 00:52:52 -0500 |
commit | 02d22e158d8deb898801e5221f84885cd99fbfed (patch) | |
tree | c8d4e4ac95344400404a97ed040945e5d77e73bb /sys/src/cmd/mothra/mothra.c | |
parent | 18a50d04ac1587ad8119feffcc1fa9f7b9b90c6d (diff) |
mothra: mouse scrollwheel behave the same as in sam
Diffstat (limited to 'sys/src/cmd/mothra/mothra.c')
-rw-r--r-- | sys/src/cmd/mothra/mothra.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/cmd/mothra/mothra.c b/sys/src/cmd/mothra/mothra.c index 537f71dd4..fef7c9573 100644 --- a/sys/src/cmd/mothra/mothra.c +++ b/sys/src/cmd/mothra/mothra.c @@ -394,11 +394,11 @@ void main(int argc, char *argv[]){ break; case Emouse: mouse=e.mouse; - if(mouse.buttons & (8|16)){ + if(mouse.buttons & (8|16) && ptinrect(mouse.xy, text->r)){ if(mouse.buttons & 8) - scrolltext(-text->size.y/24, 1); + scrolltext(text->r.min.y - mouse.xy.y, 1); else - scrolltext(text->size.y/24, 1); + scrolltext(mouse.xy.y - text->r.min.y, 1); break; } plmouse(root, &mouse); |