summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 1f8589b50..be516ebe9 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -698,7 +698,8 @@ void Gui::handleMouseMoved(const MouseInput &mouseInput)
&& Widget::widgetExists(widget) &&
(widget != nullptr))
{
- int x, y;
+ int x;
+ int y;
widget->getAbsolutePosition(x, y);
if (x > mouseX || y > mouseY
@@ -1273,7 +1274,8 @@ Widget* Gui::getWidgetAt(const int x, const int y) const
while (child != nullptr)
{
Widget *const swap = child;
- int parentX, parentY;
+ int parentX;
+ int parentY;
parent->getAbsolutePosition(parentX, parentY);
child = parent->getWidgetAt(x - parentX, y - parentY);
parent = swap;