summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/window.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/window.cpp b/src/window.cpp
index fed8e5e0a..5779bd6f9 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -1406,7 +1406,8 @@ static EventState HandleMouseDrag()
return ES_HANDLED;
}
-static bool HandleMouseOver()
+/** Report position of the mouse to the underlying window. */
+static void HandleMouseOver()
{
Window *w = FindWindowFromPt(_cursor.pos.x, _cursor.pos.y);
@@ -1426,9 +1427,6 @@ static bool HandleMouseOver()
const NWidgetCore *widget = w->nested_root->GetWidgetFromPos(pt.x, pt.y);
if (widget != NULL) w->OnMouseOver(pt, widget->index);
}
-
- /* Mouseover never stops execution */
- return true;
}
/**
@@ -2094,7 +2092,8 @@ static void MouseLoop(MouseClick click, int mousewheel)
if (HandleWindowDragging() == ES_HANDLED) return;
if (HandleScrollbarScrolling() == ES_HANDLED) return;
if (HandleViewportScroll() == ES_HANDLED) return;
- if (!HandleMouseOver()) return;
+
+ HandleMouseOver();
bool scrollwheel_scrolling = _settings_client.gui.scrollwheel_scrolling == 1 && (_cursor.v_wheel != 0 || _cursor.h_wheel != 0);
if (click == MC_NONE && mousewheel == 0 && !scrollwheel_scrolling) return;