summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/widgets/window.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 95ceee0eb..7680600ff 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -510,7 +510,13 @@ void Window::setVisible(bool visible, bool forceSticky)
gui->createMouseEvent(this));
if (event)
{
- mouseMoved(*event);
+ const int x = event->getX();
+ const int y = event->getY();
+ if (x >= 0 && x <= mDimension.width
+ && y >= 0 && y <= mDimension.height)
+ {
+ mouseMoved(*event);
+ }
delete event;
}
}