From f462ccd5ad11da7bddfa627d4773e3b02f18e2b8 Mon Sep 17 00:00:00 2001 From: groucho Date: Sat, 22 Mar 2003 09:21:03 +0000 Subject: Bug fix- Key presess are now routed up to the QPEApplication event queue if ignore is defined for a certain key --- 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 @@ -350,10 +350,13 @@ bool DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keyc if (!db-> pressedAction ( ). channel ( ) .isEmpty()) { + if ( db-> pressedAction ( ). channel ( )!="ignore") { + db-> pressedAction ( ). send ( ); } - else return false; + else + return false; } } else if ( press && !autoRepeat ) { @@ -374,13 +377,15 @@ 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 ); @@ -665,8 +670,6 @@ void Desktop::togglePower() { static bool excllock = false; - qDebug ( "togglePower (locked == %d)", excllock ? 1 : 0 ); - if ( excllock ) return ; -- cgit v0.9.0.2