-rw-r--r-- | core/launcher/desktop.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index 7662e48..24dce73 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp | |||
@@ -191,18 +191,24 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e ) | |||
191 | if ( e->type == QWSEvent::Key ) { | 191 | if ( e->type == QWSEvent::Key ) { |
192 | QWSKeyEvent *ke = (QWSKeyEvent *)e; | 192 | QWSKeyEvent *ke = (QWSKeyEvent *)e; |
193 | if ( !loggedin && ke->simpleData.keycode != Key_F34 ) | 193 | if ( !loggedin && ke->simpleData.keycode != Key_F34 ) |
194 | return TRUE; | 194 | return TRUE; |
195 | bool press = ke->simpleData.is_press; | 195 | bool press = ke->simpleData.is_press; |
196 | bool autoRepeat= ke->simpleData.is_auto_repeat; | 196 | bool autoRepeat= ke->simpleData.is_auto_repeat; |
197 | if (!keyRegisterList.isEmpty()) | 197 | |
198 | { | 198 | /* |
199 | app that registers key/message to be sent back to the app, when it doesn't have focus, | ||
200 | when user presses key, unless keyboard has been requested from app. | ||
201 | will not send multiple repeats if user holds key | ||
202 | i.e. one shot | ||
203 | |||
204 | */ | ||
205 | if (!keyRegisterList.isEmpty()) { | ||
199 | KeyRegisterList::Iterator it; | 206 | KeyRegisterList::Iterator it; |
200 | for( it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it ) | 207 | for( it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it ) { |
201 | { | 208 | if ((*it).getKeyCode() == ke->simpleData.keycode && !autoRepeat && !keyboardGrabbed()) { |
202 | if ((*it).getKeyCode() == ke->simpleData.keycode && !autoRepeat) { | ||
203 | if(press) qDebug("press"); else qDebug("release"); | 209 | if(press) qDebug("press"); else qDebug("release"); |
204 | QCopEnvelope((*it).getChannel().utf8(), (*it).getMessage().utf8()); | 210 | QCopEnvelope((*it).getChannel().utf8(), (*it).getMessage().utf8()); |
205 | } | 211 | } |
206 | } | 212 | } |
207 | } | 213 | } |
208 | 214 | ||