forked from External/mage
GUI: fixed wrong clicks from additional mouse buttons (now only left clicks are allowed, closes #11455)
This commit is contained in:
parent
75958e3710
commit
a0ed89035f
17 changed files with 82 additions and 21 deletions
|
|
@ -121,6 +121,14 @@ public class MageActionCallback implements ActionCallback {
|
|||
if (e.isConsumed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// allows only a standard mouse buttons
|
||||
if (!e.isPopupTrigger()
|
||||
&& !SwingUtilities.isLeftMouseButton(e)
|
||||
&& !SwingUtilities.isRightMouseButton(e)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.getComponent().getCardContainer() instanceof CardEventProducer) {
|
||||
ClientEventType clickType = doubleClick ? ClientEventType.CARD_DOUBLE_CLICK : ClientEventType.CARD_CLICK;
|
||||
CardEventProducer cardContainer = (CardEventProducer) data.getComponent().getCardContainer();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue