diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-12-11 00:00:32 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2018-12-11 00:47:12 +0000 |
commit | c18c63033e55190d9cb0cff4c3a901b6082de5ea (patch) | |
tree | 6f26d9b4045df166e7b36c087bc2a7abf880a78f /src/plugins | |
parent | 75ee55e22a49327193aade21bf615efc7c879564 (diff) | |
parent | a2fd99c430e253ac9c695ffdad635e6882eb910a (diff) |
Merge "Merge remote-tracking branch 'origin/5.12' into dev" into refs/staging/dev
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoatheme.mm | 7 | ||||
-rw-r--r-- | src/plugins/platforms/platforms.pro | 2 | ||||
-rw-r--r-- | src/plugins/platforms/windows/qwindowssystemtrayicon.cpp | 18 |
3 files changed, 21 insertions, 6 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm index a2229159b5..240deeddbd 100644 --- a/src/plugins/platforms/cocoa/qcocoatheme.mm +++ b/src/plugins/platforms/cocoa/qcocoatheme.mm @@ -53,11 +53,13 @@ #include "qcocoahelpers.h" #include <QtCore/qfileinfo.h> +#include <QtGui/private/qfont_p.h> #include <QtGui/private/qguiapplication_p.h> #include <QtGui/private/qcoregraphics_p.h> #include <QtGui/qpainter.h> #include <QtGui/qtextformat.h> #include <QtFontDatabaseSupport/private/qcoretextfontdatabase_p.h> +#include <QtFontDatabaseSupport/private/qfontengine_coretext_p.h> #include <QtThemeSupport/private/qabstractfileiconengine_p.h> #include <qpa/qplatformdialoghelper.h> #include <qpa/qplatformintegration.h> @@ -162,6 +164,11 @@ void QCocoaTheme::handleSystemThemeChange() m_systemPalette = qt_mac_createSystemPalette(); m_palettes = qt_mac_createRolePalettes(); + if (QCoreTextFontEngine::fontSmoothing() == QCoreTextFontEngine::FontSmoothing::Grayscale) { + // Re-populate glyph caches based on the new appearance's assumed text fill color + QFontCache::instance()->clear(); + } + QWindowSystemInterface::handleThemeChange(nullptr); } diff --git a/src/plugins/platforms/platforms.pro b/src/plugins/platforms/platforms.pro index 5bf2b77421..db2a31d1a5 100644 --- a/src/plugins/platforms/platforms.pro +++ b/src/plugins/platforms/platforms.pro @@ -46,7 +46,7 @@ haiku { SUBDIRS += haiku } -wasm: SUBDIRS = wasm +wasm: SUBDIRS += wasm qtConfig(mirclient): SUBDIRS += mirclient diff --git a/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp b/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp index 901d132ea5..3c27f2914d 100644 --- a/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp +++ b/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp @@ -382,12 +382,20 @@ bool QWindowsSystemTrayIcon::winEvent(const MSG &message, long *result) emit activated(DoubleClick); // release we must ignore it break; case WM_CONTEXTMENU: { + // QTBUG-67966: Coordinates may be out of any screen in PROCESS_DPI_UNAWARE mode + // since hi-res coordinates are delivered in this case (Windows issue). + // Default to primary screen with check to prevent a crash. const QPoint globalPos = QPoint(GET_X_LPARAM(message.wParam), GET_Y_LPARAM(message.wParam)); - const QPlatformScreen *screen = QWindowsContext::instance()->screenManager().screenAtDp(globalPos); - emit contextMenuRequested(globalPos, screen); - emit activated(Context); - if (m_menu) - m_menu->trackPopupMenu(message.hwnd, globalPos.x(), globalPos.y()); + const auto &screenManager = QWindowsContext::instance()->screenManager(); + const QPlatformScreen *screen = screenManager.screenAtDp(globalPos); + if (!screen) + screen = screenManager.screens().value(0); + if (screen) { + emit contextMenuRequested(globalPos, screen); + emit activated(Context); + if (m_menu) + m_menu->trackPopupMenu(message.hwnd, globalPos.x(), globalPos.y()); + } } break; case NIN_BALLOONUSERCLICK: |