From a1516c3b93174af25fe2bb4fe7f1ec1973cebe81 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 6 May 2019 09:47:19 +0200 Subject: Windows: Add debug output for message WM_DPICHANGED Add it to the name lookup and add verbose formatting to the debug operator. Task-number: QTBUG-73014 Change-Id: I31ee31bc28ef563fdbc0adedcea03546ced5faad Reviewed-by: Oliver Wolff --- src/corelib/kernel/qcoreapplication_win.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp index b373267fcb..75cc813298 100644 --- a/src/corelib/kernel/qcoreapplication_win.cpp +++ b/src/corelib/kernel/qcoreapplication_win.cpp @@ -48,6 +48,7 @@ #include "qmutex.h" #include #endif +#include "qtextstream.h" #include #include @@ -480,6 +481,7 @@ static const char *findWMstr(uint msg) { 0x02DD, "WM_TABLET_FIRST + 29" }, { 0x02DE, "WM_TABLET_FIRST + 30" }, { 0x02DF, "WM_TABLET_LAST" }, + { 0x02E0, "WM_DPICHANGED" }, { 0x0300, "WM_CUT" }, { 0x0301, "WM_COPY" }, { 0x0302, "WM_PASTE" }, @@ -765,6 +767,13 @@ QString decodeMSG(const MSG& msg) case WM_DESTROY: parameters = QLatin1String("Destroy hwnd ") + hwndS; break; + case 0x02E0u: { // WM_DPICHANGED + auto rect = reinterpret_cast(lParam); + QTextStream(¶meters) << "DPI: " << HIWORD(wParam) << ',' + << LOWORD(wParam) << ' ' << (rect->right - rect->left) << 'x' + << (rect->bottom - rect->top) << forcesign << rect->left << rect->top; + } + break; case WM_IME_NOTIFY: { parameters = QLatin1String("Command("); -- cgit v1.2.3