author | sandman <sandman> | 2002-12-22 23:59:13 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-12-22 23:59:13 (UTC) |
commit | c513f413c7d901cc9945714c8e7eb47292f63306 (patch) (unidiff) | |
tree | 9ce6af28225f006dffbeb536eb2fd520e903e08d /library/qpemenubar.cpp | |
parent | 5c7694a7baadec8afe128ad2541e0a8acfc23737 (diff) | |
download | opie-c513f413c7d901cc9945714c8e7eb47292f63306.zip opie-c513f413c7d901cc9945714c8e7eb47292f63306.tar.gz opie-c513f413c7d901cc9945714c8e7eb47292f63306.tar.bz2 |
Totally reworked the key grabbing, which always had problems:
- applications get *all* key events now, as long as they have the focus
- an application decides if it has the keyboard grabbed or not
- if it's grabbed, the app consumes the key press
- if it's not grabbed and a F1-F29 key is pressed, the app sends a QCop
call to the launcher (deviceButtonPressed(...))
- when the launcher receives a QCop deviceButtonPressed it simply sends
the configured QCopEnvelope
- all "special" actions (like menu, home) are now accessible via QCop
calls (see buttonsettings)
-rw-r--r-- | library/qpemenubar.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/library/qpemenubar.cpp b/library/qpemenubar.cpp index 4aa0bf3..3e5bad5 100644 --- a/library/qpemenubar.cpp +++ b/library/qpemenubar.cpp | |||
@@ -220,20 +220,16 @@ bool QPEMenuToolFocusManager::eventFilter( QObject *object, QEvent *event ) | |||
220 | QMenuItem *mi = mb->findItem( mb->idAt(i) ); | 220 | QMenuItem *mi = mb->findItem( mb->idAt(i) ); |
221 | if ( mi->isEnabled() && !mi->isSeparator() ) { | 221 | if ( mi->isEnabled() && !mi->isSeparator() ) { |
222 | break; | 222 | break; |
223 | } | 223 | } |
224 | } | 224 | } |
225 | } | 225 | } |
226 | } | 226 | } |
227 | } | 227 | } |
228 | if ( ke->key() == Key_F11 ) { | ||
229 | setActive( !isActive() ); | ||
230 | return TRUE; | ||
231 | } | ||
232 | } else if ( event->type() == QEvent::KeyRelease ) { | 228 | } else if ( event->type() == QEvent::KeyRelease ) { |
233 | QKeyEvent *ke = (QKeyEvent *)event; | 229 | QKeyEvent *ke = (QKeyEvent *)event; |
234 | if ( isActive() ) { | 230 | if ( isActive() ) { |
235 | if ( object->inherits( "QButton" ) ) { | 231 | if ( object->inherits( "QButton" ) ) { |
236 | // Deactivate when a button is selected | 232 | // Deactivate when a button is selected |
237 | if ( ke->key() == Key_Space ) | 233 | if ( ke->key() == Key_Space ) |
238 | QTimer::singleShot( 0, this, SLOT(deactivate()) ); | 234 | QTimer::singleShot( 0, this, SLOT(deactivate()) ); |
239 | } | 235 | } |