diff options
-rw-r--r-- | src/gui/viewport.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index a36f91cf..9633cbd5 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -468,8 +468,7 @@ void Viewport::mouseMoved(gcn::MouseEvent &event) const int y = (event.getY() + (int) mPixelViewY); mHoverBeing = beingManager->findBeingByPixel(x, y); - if (mHoverBeing && mHoverBeing->getType() == Being::PLAYER && - event.getSource() == this) + if (mHoverBeing && mHoverBeing->getType() == Being::PLAYER) mBeingPopup->show(getMouseX(), getMouseY(), static_cast<Player*>(mHoverBeing)); else @@ -478,6 +477,10 @@ 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()) |