diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-03-21 17:32:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-03-21 18:51:45 +0300 |
commit | 3ed0b5f6edce152fa2eca9c84d64cbeec8ac0173 (patch) | |
tree | 8791e88608a737b0cb56997743a1404f982eecc8 /src/gui/windows | |
parent | 1dd71a1f8489b35d1c989fb0477122224d981853 (diff) | |
download | manaverse-3ed0b5f6edce152fa2eca9c84d64cbeec8ac0173.tar.gz manaverse-3ed0b5f6edce152fa2eca9c84d64cbeec8ac0173.tar.bz2 manaverse-3ed0b5f6edce152fa2eca9c84d64cbeec8ac0173.tar.xz manaverse-3ed0b5f6edce152fa2eca9c84d64cbeec8ac0173.zip |
Add consume calls into mouse press / click handlers.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/windows/equipmentwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/ministatuswindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/windows/npcdialog.cpp | 1 | ||||
-rw-r--r-- | src/gui/windows/serverdialog.cpp | 12 | ||||
-rw-r--r-- | src/gui/windows/skilldialog.cpp | 1 |
6 files changed, 14 insertions, 4 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 5698973f3..c6e4182d8 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -732,6 +732,7 @@ void ChatWindow::mousePressed(MouseEvent &event) Tab *const tab = mChatTabs->getSelectedTab(); if (tab) { + event.consume(); if (inputManager.isActionActive(static_cast<int>( Input::KEY_CHAT_MOD))) { diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp index 3799015e5..b8b693fc1 100644 --- a/src/gui/windows/equipmentwindow.cpp +++ b/src/gui/windows/equipmentwindow.cpp @@ -332,6 +332,7 @@ void EquipmentWindow::mousePressed(MouseEvent& mouseEvent) inBox = true; if (item) { + mouseEvent.consume(); setSelected(i); dragDrop.dragItem(item, DRAGDROP_SOURCE_EQUIPMENT); return; @@ -355,6 +356,7 @@ void EquipmentWindow::mousePressed(MouseEvent& mouseEvent) const int my = y + getY(); if (viewport) { + mouseEvent.consume(); if (mForing) viewport->showUndressPopup(mx, my, mBeing, item); else diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp index 939bfb619..216d33f42 100644 --- a/src/gui/windows/ministatuswindow.cpp +++ b/src/gui/windows/ministatuswindow.cpp @@ -443,6 +443,7 @@ void MiniStatusWindow::mousePressed(MouseEvent &event) event.getSource()); if (!bar) return; + event.consume(); if (viewport) { viewport->showPopup(getX() + event.getX(), diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp index 17454b6ab..17ff9a8c1 100644 --- a/src/gui/windows/npcdialog.cpp +++ b/src/gui/windows/npcdialog.cpp @@ -969,6 +969,7 @@ void NpcDialog::mousePressed(MouseEvent &event) if (event.getButton() == MouseEvent::RIGHT && event.getSource() == mTextBox) { + event.consume(); if (viewport) viewport->showNpcDialogPopup(mNpcId); } diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp index 112d1588d..5b0b557dc 100644 --- a/src/gui/windows/serverdialog.cpp +++ b/src/gui/windows/serverdialog.cpp @@ -452,11 +452,15 @@ void ServerDialog::valueChanged(const SelectionEvent &) void ServerDialog::mouseClicked(MouseEvent &mouseEvent) { - if (mouseEvent.getClickCount() == 2 && - mouseEvent.getSource() == mServersList) + if (mouseEvent.getButton() == MouseEvent::LEFT) { - action(ActionEvent(mConnectButton, - mConnectButton->getActionEventId())); + mouseEvent.consume(); + if (mouseEvent.getClickCount() == 2 && + mouseEvent.getSource() == mServersList) + { + action(ActionEvent(mConnectButton, + mConnectButton->getActionEventId())); + } } } diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index 21cc009bc..ebad47b98 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -215,6 +215,7 @@ class SkillListBox final : public ListBox const SkillInfo *const skill = getSkillByEvent(event); if (!skill) return; + event.consume(); mSkillClicked = true; } } |