summaryrefslogtreecommitdiff
path: root/src/gui/widgets/window.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-26 03:13:45 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-27 14:39:22 +0300
commitaeff5ccbda56ef0dd4259f0b02ba318c28b7945b (patch)
treec1c23ca4b76d30024c94daff7eea36d5fdfd99cf /src/gui/widgets/window.cpp
parent7d24b0dd32fafa7a85724400d525c5ee7923d0ba (diff)
downloadmv-aeff5ccbda56ef0dd4259f0b02ba318c28b7945b.tar.gz
mv-aeff5ccbda56ef0dd4259f0b02ba318c28b7945b.tar.bz2
mv-aeff5ccbda56ef0dd4259f0b02ba318c28b7945b.tar.xz
mv-aeff5ccbda56ef0dd4259f0b02ba318c28b7945b.zip
Fix mouse event handling in windows set visible.
Diffstat (limited to 'src/gui/widgets/window.cpp')
-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;
}
}