summaryrefslogtreecommitdiff
path: root/core/launcher/desktop.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/desktop.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 59f2aea..fbcce7c 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -344,3 +344,3 @@ void DesktopApplication::sendHeldAction ( )
-void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keycode*/, bool press, bool autoRepeat )
+bool DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keycode*/, bool press, bool autoRepeat )
{
@@ -349,4 +349,9 @@ void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keyc
m_button_timer-> stop ( );
- if ( !db-> pressedAction ( ). channel ( ). isEmpty ( )) {
- db-> pressedAction ( ). send ( );
+
+ if (!db-> pressedAction ( ). channel ( ) .isEmpty())
+ {
+ if ( db-> pressedAction ( ). channel ( )!="ignore") {
+ db-> pressedAction ( ). send ( );
+ }
+ else return false;
}
@@ -355,6 +360,10 @@ void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keyc
m_button_timer-> stop ( );
+ if (!db-> pressedAction ( ). channel ( ) .isEmpty())
+ {
- if ( !db-> heldAction ( ). channel ( ). isEmpty ( )) {
- m_last_button = db;
- m_button_timer-> start ( ODevice::inst ( )-> buttonHoldTime ( ), true );
+ if ( db-> heldAction ( ). channel ( )!="ignore") {
+ m_last_button = db;
+ m_button_timer-> start ( ODevice::inst ( )-> buttonHoldTime ( ), true );
+ }
+ else return false;
}
@@ -362,2 +371,3 @@ void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keyc
}
+ return true;
}
@@ -372,4 +382,3 @@ bool DesktopApplication::eventFilter ( QObject *o, QEvent *e )
if ( db ) {
- checkButtonAction ( db, ke-> key ( ), e-> type ( ) == QEvent::KeyPress, ke-> isAutoRepeat ( ));
- return true;
+ return checkButtonAction ( db, ke-> key ( ), e-> type ( ) == QEvent::KeyPress, ke-> isAutoRepeat ( ));
}