summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication_win.cpp
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-06-06 15:35:06 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-06-06 19:00:41 +0200
commit2a302a73613d68475e667f69b8e36ce07853c813 (patch)
tree06de55baaed993b51af517dba8f230fab749882c /src/corelib/kernel/qcoreapplication_win.cpp
parent5505d25be972948db1621e1511b89b4144aa8bfc (diff)
parentdea7110b29c5c68a5b09454c968324042ed1b607 (diff)
Merge remote-tracking branch 'origin/dev' into wip/qt6
Diffstat (limited to 'src/corelib/kernel/qcoreapplication_win.cpp')
-rw-r--r--src/corelib/kernel/qcoreapplication_win.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp
index b373267fcb..6995f9bbab 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>
@@ -63,8 +64,6 @@ using namespace Microsoft::WRL::Wrappers;
QT_BEGIN_NAMESPACE
-int appCmdShow = 0;
-
Q_CORE_EXPORT QString qAppFileName() // get application file name
{
/*
@@ -174,16 +173,12 @@ Q_CORE_EXPORT HINSTANCE qWinAppPrevInst() // get Windows prev app
Q_CORE_EXPORT int qWinAppCmdShow() // get main window show command
{
-#if defined(Q_OS_WINCE)
- return appCmdShow;
-#else
STARTUPINFO startupInfo;
GetStartupInfo(&startupInfo);
return (startupInfo.dwFlags & STARTF_USESHOWWINDOW)
? startupInfo.wShowWindow
: SW_SHOWDEFAULT;
-#endif
}
#endif
@@ -480,6 +475,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 +761,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) << Qt::forcesign << rect->left << rect->top;
+ }
+ break;
case WM_IME_NOTIFY:
{
parameters = QLatin1String("Command(");