diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-26 03:13:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-27 14:39:22 +0300 |
commit | aeff5ccbda56ef0dd4259f0b02ba318c28b7945b (patch) | |
tree | c1c23ca4b76d30024c94daff7eea36d5fdfd99cf /src/gui | |
parent | 7d24b0dd32fafa7a85724400d525c5ee7923d0ba (diff) | |
download | manaplus-aeff5ccbda56ef0dd4259f0b02ba318c28b7945b.tar.gz manaplus-aeff5ccbda56ef0dd4259f0b02ba318c28b7945b.tar.bz2 manaplus-aeff5ccbda56ef0dd4259f0b02ba318c28b7945b.tar.xz manaplus-aeff5ccbda56ef0dd4259f0b02ba318c28b7945b.zip |
Fix mouse event handling in windows set visible.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/window.cpp | 8 |
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; } } |