summaryrefslogtreecommitdiff
authorgroucho <groucho>2003-03-22 09:21:03 (UTC)
committer groucho <groucho>2003-03-22 09:21:03 (UTC)
commitf462ccd5ad11da7bddfa627d4773e3b02f18e2b8 (patch) (side-by-side diff)
treeba1250690fe416d01802059117107391fecb0d88
parent32458f9d70e8b13a7e8ff46c06af17860c218f23 (diff)
downloadopie-f462ccd5ad11da7bddfa627d4773e3b02f18e2b8.zip
opie-f462ccd5ad11da7bddfa627d4773e3b02f18e2b8.tar.gz
opie-f462ccd5ad11da7bddfa627d4773e3b02f18e2b8.tar.bz2
Bug fix- Key presess are now routed up to the QPEApplication event queue if ignore is defined for a certain key
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index fbcce7c..86527f6 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -349,12 +349,15 @@ bool DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keyc
m_button_timer-> stop ( );
if (!db-> pressedAction ( ). channel ( ) .isEmpty())
{
+
if ( db-> pressedAction ( ). channel ( )!="ignore") {
+
db-> pressedAction ( ). send ( );
}
- else return false;
+ else
+ return false;
}
}
else if ( press && !autoRepeat ) {
m_button_timer-> stop ( );
@@ -373,15 +376,17 @@ bool DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keyc
}
bool DesktopApplication::eventFilter ( QObject *o, QEvent *e )
{
+
if ( e-> type ( ) == QEvent::KeyPress || e-> type ( ) == QEvent::KeyRelease ) {
QKeyEvent *ke = (QKeyEvent *) e;
const ODeviceButton *db = ODevice::inst ( )-> buttonForKeycode ( ke-> key ( ));
if ( db ) {
- return checkButtonAction ( db, ke-> key ( ), e-> type ( ) == QEvent::KeyPress, ke-> isAutoRepeat ( ));
+ if (checkButtonAction ( db, ke-> key ( ), e-> type ( ) == QEvent::KeyPress, ke-> isAutoRepeat ( )))
+ return true; //checkButtonAction retrune false if events should be routed through
}
}
return QPEApplication::eventFilter ( o, e );
}
@@ -664,10 +669,8 @@ void Desktop::execAutoStart()
void Desktop::togglePower()
{
static bool excllock = false;
- qDebug ( "togglePower (locked == %d)", excllock ? 1 : 0 );
-
if ( excllock )
return ;
excllock = true;