summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugingui/button.cc5
-rw-r--r--plugingui/checkbox.cc5
-rw-r--r--plugingui/combobox.cc5
-rw-r--r--plugingui/knob.cc5
-rw-r--r--plugingui/lineedit.cc5
-rw-r--r--plugingui/listboxbasic.cc5
-rw-r--r--plugingui/scrollbar.cc5
-rw-r--r--plugingui/slider.cc5
8 files changed, 40 insertions, 0 deletions
diff --git a/plugingui/button.cc b/plugingui/button.cc
index 5270658..7c1e005 100644
--- a/plugingui/button.cc
+++ b/plugingui/button.cc
@@ -46,6 +46,11 @@ Button::~Button()
void Button::buttonEvent(ButtonEvent* buttonEvent)
{
+ // Ignore everything except left clicks.
+ if (buttonEvent->button != MouseButton::left) {
+ return;
+ }
+
if(buttonEvent->direction == Direction::down)
{
draw_state = down;
diff --git a/plugingui/checkbox.cc b/plugingui/checkbox.cc
index a218d44..4f71e54 100644
--- a/plugingui/checkbox.cc
+++ b/plugingui/checkbox.cc
@@ -41,6 +41,11 @@ CheckBox::CheckBox(Widget* parent)
void CheckBox::buttonEvent(ButtonEvent* buttonEvent)
{
+ // Ignore everything except left clicks.
+ if (buttonEvent->button != MouseButton::left) {
+ return;
+ }
+
if((buttonEvent->direction == Direction::up) || buttonEvent->doubleClick)
{
buttonDown = false;
diff --git a/plugingui/combobox.cc b/plugingui/combobox.cc
index 752dbb3..5b7dd89 100644
--- a/plugingui/combobox.cc
+++ b/plugingui/combobox.cc
@@ -209,6 +209,11 @@ void ComboBox::keyEvent(KeyEvent* keyEvent)
void ComboBox::buttonEvent(ButtonEvent* buttonEvent)
{
+ // Ignore everything except left clicks.
+ if (buttonEvent->button != MouseButton::left) {
+ return;
+ }
+
if(buttonEvent->direction != Direction::down)
{
return;
diff --git a/plugingui/knob.cc b/plugingui/knob.cc
index 27d4083..4e7db3b 100644
--- a/plugingui/knob.cc
+++ b/plugingui/knob.cc
@@ -124,6 +124,11 @@ void Knob::keyEvent(KeyEvent* keyEvent)
void Knob::buttonEvent(ButtonEvent* buttonEvent)
{
+ // Ignore everything except left clicks.
+ if (buttonEvent->button != MouseButton::left) {
+ return;
+ }
+
if(buttonEvent->direction == Direction::down)
{
state = down;
diff --git a/plugingui/lineedit.cc b/plugingui/lineedit.cc
index b99d103..50d4a39 100644
--- a/plugingui/lineedit.cc
+++ b/plugingui/lineedit.cc
@@ -77,6 +77,11 @@ void LineEdit::buttonEvent(ButtonEvent *buttonEvent)
return;
}
+ // Ignore everything except left clicks.
+ if (buttonEvent->button != MouseButton::left) {
+ return;
+ }
+
if(buttonEvent->direction == Direction::down)
{
for(int i = 0; i < (int)visibleText.length(); ++i)
diff --git a/plugingui/listboxbasic.cc b/plugingui/listboxbasic.cc
index d589ebb..3711b56 100644
--- a/plugingui/listboxbasic.cc
+++ b/plugingui/listboxbasic.cc
@@ -282,6 +282,11 @@ void ListBoxBasic::keyEvent(KeyEvent* keyEvent)
void ListBoxBasic::buttonEvent(ButtonEvent* buttonEvent)
{
+ // Ignore everything except left clicks.
+ if (buttonEvent->button != MouseButton::left) {
+ return;
+ }
+
if((buttonEvent->x > ((int)width() - btn_size)) &&
(buttonEvent->y < ((int)width() - 1)))
{
diff --git a/plugingui/scrollbar.cc b/plugingui/scrollbar.cc
index da82105..3f53f03 100644
--- a/plugingui/scrollbar.cc
+++ b/plugingui/scrollbar.cc
@@ -175,6 +175,11 @@ void ScrollBar::mouseMoveEvent(MouseMoveEvent* mouseMoveEvent)
void ScrollBar::buttonEvent(ButtonEvent* buttonEvent)
{
+ // Ignore everything except left clicks.
+ if (buttonEvent->button != MouseButton::left) {
+ return;
+ }
+
if((buttonEvent->y < (int)width()) && buttonEvent->y > 0)
{
if(buttonEvent->direction == Direction::down)
diff --git a/plugingui/slider.cc b/plugingui/slider.cc
index 71dd0c5..64a4b3f 100644
--- a/plugingui/slider.cc
+++ b/plugingui/slider.cc
@@ -99,6 +99,11 @@ void Slider::repaintEvent(RepaintEvent* repaintEvent)
void Slider::buttonEvent(ButtonEvent* buttonEvent)
{
+ // Ignore everything except left clicks.
+ if (buttonEvent->button != MouseButton::left) {
+ return;
+ }
+
if(buttonEvent->direction == Direction::down)
{
state = State::down;