summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/cocoa/qcocoatheme.mm7
-rw-r--r--src/plugins/platforms/platforms.pro2
-rw-r--r--src/plugins/platforms/windows/qwindowssystemtrayicon.cpp18
3 files changed, 21 insertions, 6 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm
index a2229159b52..240deeddbda 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 5bf2b77421d..db2a31d1a5e 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 901d132ea53..3c27f2914d1 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: