-rw-r--r-- | core/launcher/desktop.cpp | 25 | ||||
-rw-r--r-- | core/launcher/desktop.h | 2 |
2 files changed, 18 insertions, 9 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 ( ) | |||
344 | 344 | ||
345 | void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keycode*/, bool press, bool autoRepeat ) | 345 | bool DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keycode*/, bool press, bool autoRepeat ) |
346 | { | 346 | { |
@@ -349,4 +349,9 @@ void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keyc | |||
349 | m_button_timer-> stop ( ); | 349 | m_button_timer-> stop ( ); |
350 | if ( !db-> pressedAction ( ). channel ( ). isEmpty ( )) { | 350 | |
351 | db-> pressedAction ( ). send ( ); | 351 | if (!db-> pressedAction ( ). channel ( ) .isEmpty()) |
352 | { | ||
353 | if ( db-> pressedAction ( ). channel ( )!="ignore") { | ||
354 | db-> pressedAction ( ). send ( ); | ||
355 | } | ||
356 | else return false; | ||
352 | } | 357 | } |
@@ -355,6 +360,10 @@ void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keyc | |||
355 | m_button_timer-> stop ( ); | 360 | m_button_timer-> stop ( ); |
361 | if (!db-> pressedAction ( ). channel ( ) .isEmpty()) | ||
362 | { | ||
356 | 363 | ||
357 | if ( !db-> heldAction ( ). channel ( ). isEmpty ( )) { | 364 | if ( db-> heldAction ( ). channel ( )!="ignore") { |
358 | m_last_button = db; | 365 | m_last_button = db; |
359 | m_button_timer-> start ( ODevice::inst ( )-> buttonHoldTime ( ), true ); | 366 | m_button_timer-> start ( ODevice::inst ( )-> buttonHoldTime ( ), true ); |
367 | } | ||
368 | else return false; | ||
360 | } | 369 | } |
@@ -362,2 +371,3 @@ void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keyc | |||
362 | } | 371 | } |
372 | return true; | ||
363 | } | 373 | } |
@@ -372,4 +382,3 @@ bool DesktopApplication::eventFilter ( QObject *o, QEvent *e ) | |||
372 | if ( db ) { | 382 | if ( db ) { |
373 | checkButtonAction ( db, ke-> key ( ), e-> type ( ) == QEvent::KeyPress, ke-> isAutoRepeat ( )); | 383 | return checkButtonAction ( db, ke-> key ( ), e-> type ( ) == QEvent::KeyPress, ke-> isAutoRepeat ( )); |
374 | return true; | ||
375 | } | 384 | } |
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: | |||
85 | virtual bool eventFilter ( QObject *o, QEvent *e ); | 85 | virtual bool eventFilter ( QObject *o, QEvent *e ); |
86 | void checkButtonAction ( const Opie::ODeviceButton *db, int keycode, bool press, bool autoRepeat ); | 86 | bool checkButtonAction ( const Opie::ODeviceButton *db, int keycode, bool press, bool autoRepeat ); |
87 | 87 | ||