From 644441eed3997bc8cf7cfe5b4f56adee6e232ffd Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 8 Jan 2016 17:12:50 +0100 Subject: Windows: Output resulting DPI awareness in debug and warning output. Fix the signature of QWindowsShcoreDLL::GetProcessDpiAwareness and output the value in the warning about failures of SetProcessDpiAwareness and in debug output. Failures occur when Qt is embedded into another application, for example Active Qt servers. Task-number: QTBUG-41186 Task-number: QTBUG-50206 Change-Id: I3fd6cba26826ee8bbfa0a34f129deb64797c947f Reviewed-by: Joerg Bornemann --- src/plugins/platforms/windows/qwindowscontext.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/windows/qwindowscontext.h') diff --git a/src/plugins/platforms/windows/qwindowscontext.h b/src/plugins/platforms/windows/qwindowscontext.h index d08fc8f726..14baec96d8 100644 --- a/src/plugins/platforms/windows/qwindowscontext.h +++ b/src/plugins/platforms/windows/qwindowscontext.h @@ -148,7 +148,7 @@ struct QWindowsShcoreDLL { void init(); inline bool isValid() const { return getProcessDpiAwareness && setProcessDpiAwareness && getDpiForMonitor; } - typedef HRESULT (WINAPI *GetProcessDpiAwareness)(HANDLE,int); + typedef HRESULT (WINAPI *GetProcessDpiAwareness)(HANDLE,int *); typedef HRESULT (WINAPI *SetProcessDpiAwareness)(int); typedef HRESULT (WINAPI *GetDpiForMonitor)(HMONITOR,int,UINT *,UINT *); @@ -219,6 +219,7 @@ public: void setTabletAbsoluteRange(int a); void setProcessDpiAwareness(QtWindows::ProcessDpiAwareness dpiAwareness); + static int processDpiAwareness(); // Returns a combination of SystemInfoFlags unsigned systemInfo() const; -- cgit v1.2.3