diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-01-05 02:37:42 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-01-05 02:37:42 +0100 |
commit | f912e018548a1977d849016dca29f9d64cae4f47 (patch) | |
tree | c92a6e6a9fd9758ece4af76021b41d7ee6ac6754 /sys/src/cmd/rio/scrl.c | |
parent | 536423eba6eab6fc8b47b49fb6e25bf38168ffe7 (diff) |
rio: make scrollwheel handling consistent with sam
scrollwheel now works proportional to y mouse position.
special case is when shift is hold down. then scrollwheel
will work like before and scroll one line up or down.
Diffstat (limited to 'sys/src/cmd/rio/scrl.c')
-rw-r--r-- | sys/src/cmd/rio/scrl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/src/cmd/rio/scrl.c b/sys/src/cmd/rio/scrl.c index 24d0ae568..de0257538 100644 --- a/sys/src/cmd/rio/scrl.c +++ b/sys/src/cmd/rio/scrl.c @@ -153,7 +153,7 @@ wscroll(Window *w, int but) readmouse(&w->mc); continue; } - if(but == 1) + if(but == 1 || but == 4) p0 = wbacknl(w, w->org, (my-s.min.y)/w->font->height); else p0 = w->org+frcharofpt(w, Pt(s.max.x, my)); @@ -163,6 +163,8 @@ wscroll(Window *w, int but) /* debounce */ if(first){ flushimage(display, 1); + if(but > 3) + return; sleep(200); nbrecv(w->mc.c, &w->mc.Mouse); first = FALSE; |