(svn r6036) -Codechange: do not handle SCROLL in a central function, but let windows handle them theirself. Added WE_SCROLL for this.

This commit is contained in:
truelight
2006-08-21 14:34:59 +00:00
parent 323a3160f7
commit 9ec2fdcbf3
4 changed files with 103 additions and 81 deletions

View File

@@ -2317,6 +2317,18 @@ static void MainWindowWndProc(Window *w, WindowEvent *e)
}
e->keypress.cont = false;
break;
case WE_SCROLL: {
ViewPort *vp = IsPtInWindowViewport(w, _cursor.pos.x, _cursor.pos.y);
if (vp == NULL) {
_cursor.fix_at = false;
_scrolling_viewport = false;
}
WP(w, vp_d).scrollpos_x += e->scroll.delta.x << vp->zoom;
WP(w, vp_d).scrollpos_y += e->scroll.delta.y << vp->zoom;
} break;
}
}