mothra: mouse scrollwheel behave the same as in sam

This commit is contained in:
stanley lieber 2013-12-31 00:52:52 -05:00
parent 18a50d04ac
commit 02d22e158d

View file

@ -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);