summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication_win.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-05-06 09:47:19 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-05-08 13:25:59 +0000
commita1516c3b93174af25fe2bb4fe7f1ec1973cebe81 (patch)
tree0d00be6dcca8f90a9b14f67852dc6f84b1cbf3cb /src/corelib/kernel/qcoreapplication_win.cpp
parent95fa35fc72c2fe199c4c6a891cfa68ed17c4aa71 (diff)
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 <oliver.wolff@qt.io>
Diffstat (limited to 'src/corelib/kernel/qcoreapplication_win.cpp')
-rw-r--r--src/corelib/kernel/qcoreapplication_win.cpp9
1 files changed, 9 insertions, 0 deletions
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 <private/qthread_p.h>
#endif
+#include "qtextstream.h"
#include <ctype.h>
#include <qt_windows.h>
@@ -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<const RECT *>(lParam);
+ QTextStream(&parameters) << "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(");