From aeff5ccbda56ef0dd4259f0b02ba318c28b7945b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 26 Sep 2012 03:13:45 +0300 Subject: Fix mouse event handling in windows set visible. --- src/gui/widgets/window.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/gui/widgets/window.cpp') 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; } } -- cgit v1.2.3-70-g09d2