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>
This commit is contained in:
parent
c07559bf5b
commit
7f6c4390ec
@ -833,7 +833,10 @@ bool QWindowsKeyMapper::translateMultimediaKeyEventInternal(QWindow *window, con
|
|||||||
|
|
||||||
const int qtKey = CmdTbl[cmd];
|
const int qtKey = CmdTbl[cmd];
|
||||||
sendExtendedPressRelease(receiver, qtKey, Qt::KeyboardModifier(state), 0, 0, 0);
|
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
|
#else
|
||||||
Q_UNREACHABLE();
|
Q_UNREACHABLE();
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user