1
0
Fork 0

(svn r87) Fix: rare mousewheel scrolling with scrollbar crash

release/0.4.5
dominik 2004-08-20 11:25:36 +00:00
parent 146fab4188
commit d0fe99d8a2
1 changed files with 1 additions and 2 deletions

View File

@ -85,8 +85,7 @@ void DispatchRightClickEvent(Window *w, int x, int y) {
void DispatchMouseWheelEvent(Window *w, int wheel)
{
if (w->vscroll.count) {
if (w->vscroll.count > w->vscroll.cap) {
int pos = clamp(w->vscroll.pos + wheel, 0, w->vscroll.count - w->vscroll.cap);
if (pos != w->vscroll.pos) {
w->vscroll.pos = pos;