From 9ec2fdcbf3c6a7be52e714c4086fa8e09082b2d3 Mon Sep 17 00:00:00 2001 From: truelight Date: Mon, 21 Aug 2006 14:34:59 +0000 Subject: (svn r6036) -Codechange: do not handle SCROLL in a central function, but let windows handle them theirself. Added WE_SCROLL for this. --- main_gui.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'main_gui.c') diff --git a/main_gui.c b/main_gui.c index 3a9564d08..2e0653de9 100644 --- a/main_gui.c +++ b/main_gui.c @@ -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; } } -- cgit v1.2.3-70-g09d2