diff options
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 5 | ||||
-rw-r--r-- | src/gui/windows/equipmentwindow.cpp | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 62a032341..6af18ff06 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -1911,11 +1911,14 @@ void ChatWindow::draw(gcn::Graphics* graphics) void ChatWindow::updateVisibility() { + if (!gui) + return; + int mouseX = 0; int mouseY = 0; int x = 0; int y = 0; - SDL_GetMouseState(&mouseX, &mouseY); + gui->getMouseState(&mouseX, &mouseY); getAbsolutePosition(x, y); if (mChatInput->isVisible()) { diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp index f521f4b9b..cd04aaf99 100644 --- a/src/gui/windows/equipmentwindow.cpp +++ b/src/gui/windows/equipmentwindow.cpp @@ -425,9 +425,6 @@ void EquipmentWindow::mouseMoved(gcn::MouseEvent &event) if (item) { - int mouseX, mouseY; - SDL_GetMouseState(&mouseX, &mouseY); - mItemPopup->setItem(item); mItemPopup->position(x + getX(), y + getY()); } |