diff options
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r-- | src/gui/viewport.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 9633cbd5..a36f91cf 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -468,7 +468,8 @@ void Viewport::mouseMoved(gcn::MouseEvent &event) const int y = (event.getY() + (int) mPixelViewY); mHoverBeing = beingManager->findBeingByPixel(x, y); - if (mHoverBeing && mHoverBeing->getType() == Being::PLAYER) + if (mHoverBeing && mHoverBeing->getType() == Being::PLAYER && + event.getSource() == this) mBeingPopup->show(getMouseX(), getMouseY(), static_cast<Player*>(mHoverBeing)); else @@ -477,10 +478,6 @@ void Viewport::mouseMoved(gcn::MouseEvent &event) mHoverItem = floorItemManager->findByCoordinates(x / mMap->getTileWidth(), y / mMap->getTileHeight()); - // Don't change the cursor if the mouse is over something else - if (event.getSource() != this) - return; - if (mHoverBeing) { switch (mHoverBeing->getType()) |