(svn r9112) -Feature r9111: scrollwheel scrolling can now also scroll the smallmap
authorbjarni
Sun, 11 Mar 2007 11:57:11 +0000
changeset 6616 fb4513362b7f
parent 6615 96d30d65ed35
child 6617 bcdce825c6da
(svn r9112) -Feature r9111: scrollwheel scrolling can now also scroll the smallmap
src/window.cpp
--- a/src/window.cpp	Sun Mar 11 10:55:35 2007 +0000
+++ b/src/window.cpp	Sun Mar 11 11:57:11 2007 +0000
@@ -1707,6 +1707,11 @@
 	} 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;
 		}
 	}