summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r--src/plugins/platforms/windows/qwindowsfontengine.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowskeymapper.cpp5
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp10
3 files changed, 11 insertions, 6 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp
index 6b13d93259..a182987e3f 100644
--- a/src/plugins/platforms/windows/qwindowsfontengine.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp
@@ -1017,7 +1017,7 @@ QFontEngine::Properties QWindowsFontEngine::properties() const
void QWindowsFontEngine::getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics)
{
LOGFONT lf = m_logfont;
- lf.lfHeight = unitsPerEm;
+ lf.lfHeight = -unitsPerEm;
int flags = synthesized();
if(flags & SynthesizedItalic)
lf.lfItalic = false;
diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp
index a99a6a5dc7..25d6937d8f 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;
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 5768800947..7d67aa0d09 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -559,10 +559,11 @@ QWindowsWindowData
Q_ASSERT(result.hwnd);
const LONG_PTR style = GetWindowLongPtr(result.hwnd, GWL_STYLE);
const LONG_PTR exStyle = GetWindowLongPtr(result.hwnd, GWL_EXSTYLE);
- result.geometry = frameGeometry(result.hwnd, !GetParent(result.hwnd));
- result.frame = QWindowsGeometryHint::frame(style, exStyle);
result.embedded = false;
- qCDebug(lcQpaWindows) << "Foreign window: " << w << result.hwnd << result.geometry << result.frame;
+ result.frame = QWindowsGeometryHint::frame(style, exStyle);
+ result.geometry = frameGeometry(result.hwnd, !GetParent(result.hwnd))
+ .marginsRemoved(result.frame);
+ qCDebug(lcQpaWindows) << "Foreign window: " << w << result.hwnd << result.geometry;
return result;
}
@@ -889,7 +890,8 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const QWindowsWindowData &data)
updateDropSite();
#ifndef Q_OS_WINCE
- if (QWindowsContext::instance()->systemInfo() & QWindowsContext::SI_SupportsTouch) {
+ if ((QWindowsContext::instance()->systemInfo() & QWindowsContext::SI_SupportsTouch)
+ && aWindow->type() != Qt::ForeignWindow) {
if (QWindowsContext::user32dll.registerTouchWindow(m_data.hwnd, 0)) {
setFlag(TouchRegistered);
} else {