-rw-r--r-- | core/launcher/desktop.cpp | 19 |
1 files changed, 14 insertions, 5 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,5 +349,10 @@ void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keyc m_button_timer-> stop ( ); - if ( !db-> pressedAction ( ). channel ( ). isEmpty ( )) { + + if (!db-> pressedAction ( ). channel ( ) .isEmpty()) + { + if ( db-> pressedAction ( ). channel ( )!="ignore") { db-> pressedAction ( ). send ( ); } + else return false; + } } @@ -355,4 +360,6 @@ void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keyc m_button_timer-> stop ( ); + if (!db-> pressedAction ( ). channel ( ) .isEmpty()) + { - if ( !db-> heldAction ( ). channel ( ). isEmpty ( )) { + if ( db-> heldAction ( ). channel ( )!="ignore") { m_last_button = db; @@ -360,2 +367,3 @@ void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keyc } + else return false; } @@ -363,2 +371,4 @@ 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 ( )); } |