From 49d26fd75417b75679e85cfb4f914175b5e4a07e Mon Sep 17 00:00:00 2001 From: bjarni Date: Sun, 11 Mar 2007 11:57:11 +0000 Subject: [PATCH] (svn r9112) -Feature r9111: scrollwheel scrolling can now also scroll the smallmap --- src/window.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/window.cpp b/src/window.cpp index 41653e9263..15062ad4b5 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1707,6 +1707,11 @@ void MouseLoop(int click, int mousewheel) } else { switch (click) { case 1: DispatchLeftClickEvent(w, x - w->left, y - w->top); break; + default: + if (!scrollwheel_scrolling || w == NULL || w->window_class != WC_SMALLMAP) break; + /* We try to use the scrollwheel to scroll since we didn't touch any of the buttons. + * Simulate a right button click so we can get started. */ + /* fallthough */ case 2: DispatchRightClickEvent(w, x - w->left, y - w->top); break; } }