-rw-r--r-- | core/launcher/desktop.cpp | 19 | ||||
-rw-r--r-- | core/launcher/desktop.h | 2 |
2 files changed, 15 insertions, 6 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 ( )); } diff --git a/core/launcher/desktop.h b/core/launcher/desktop.h index db0173e..4024c38 100644 --- a/core/launcher/desktop.h +++ b/core/launcher/desktop.h @@ -85,3 +85,3 @@ protected: virtual bool eventFilter ( QObject *o, QEvent *e ); - void checkButtonAction ( const Opie::ODeviceButton *db, int keycode, bool press, bool autoRepeat ); + bool checkButtonAction ( const Opie::ODeviceButton *db, int keycode, bool press, bool autoRepeat ); |