From 02d22e158d8deb898801e5221f84885cd99fbfed Mon Sep 17 00:00:00 2001 From: stanley lieber Date: Tue, 31 Dec 2013 00:52:52 -0500 Subject: [PATCH] mothra: mouse scrollwheel behave the same as in sam --- sys/src/cmd/mothra/mothra.c | 6 +++--- 1 file 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);