diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2014-12-15 14:18:13 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2014-12-18 06:33:24 +0100 |
commit | 7f6c4390ec98b644cc3c07cc5aa5f47da37c8dd3 (patch) | |
tree | e2bc4c07fb9072281f36cd2f8b904d6541cdc3e3 /src/plugins/platforms/windows | |
parent | c07559bf5b352932dc4972a61c2c5f9b4ddc3c99 (diff) | |
download | qtbase-7f6c4390ec98b644cc3c07cc5aa5f47da37c8dd3.tar.gz |
Windows: Return false from event processing of unhandled multimedia keys.
Otherwise, potentially active players no longer receive the keys when
a Qt application is running.
Task-number: QTBUG-43343
Change-Id: Iefa511a101734690305e3244fafec4a460a9212d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r-- | src/plugins/platforms/windows/qwindowskeymapper.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp index ff9ad1874a..d781cdbe9c 100644 --- a/src/plugins/platforms/windows/qwindowskeymapper.cpp +++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp @@ -833,7 +833,10 @@ bool QWindowsKeyMapper::translateMultimediaKeyEventInternal(QWindow *window, con const int qtKey = CmdTbl[cmd]; sendExtendedPressRelease(receiver, qtKey, Qt::KeyboardModifier(state), 0, 0, 0); - return true; + // QTBUG-43343: Make sure to return false if Qt does not handle the key, otherwise, + // the keys are not passed to the active media player. + const QKeySequence sequence(Qt::Modifier(state) + qtKey); + return QGuiApplicationPrivate::instance()->shortcutMap.hasShortcutForKeySequence(sequence); #else Q_UNREACHABLE(); return false; |