From 4c4a5f8c86624f180fca3e2f80758d60f3cbaa4c Mon Sep 17 00:00:00 2001 From: Andre de la Rocha Date: Tue, 28 Aug 2018 13:36:36 +0200 Subject: [PATCH] Windows: Check Pointer messages in MessageDebugEntry Some Pointer Input messages are defined only for Windows 10 and new versions of the Windows SDK and could break compilation with older SDKs. Currently, they are not used anywhere outside of the MessageDebugEntry debug function. Checking if they are defined before using. Change-Id: I5fc7bb8e52ab8aca66bb21084289ab8938938063 Reviewed-by: Christian Kandeler Reviewed-by: Oliver Wolff --- .../eventdispatchers/qwindowsguieventdispatcher.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp b/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp index 3583ead788..a37547f513 100644 --- a/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp +++ b/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp @@ -202,11 +202,15 @@ messageDebugEntries[] = { {WM_TOUCHHITTESTING, "WM_TOUCHHITTESTING", true}, {WM_POINTERWHEEL, "WM_POINTERWHEEL", true}, {WM_POINTERHWHEEL, "WM_POINTERHWHEEL", true}, +#endif // WM_POINTERUPDATE +#ifdef DM_POINTERHITTEST {DM_POINTERHITTEST, "DM_POINTERHITTEST", true}, +#endif // DM_POINTERHITTEST +#ifdef WM_POINTERROUTEDTO {WM_POINTERROUTEDTO, "WM_POINTERROUTEDTO", true}, {WM_POINTERROUTEDAWAY, "WM_POINTERROUTEDAWAY", true}, - {WM_POINTERROUTEDRELEASED, "WM_POINTERROUTEDRELEASED", true} -#endif // WM_POINTERUPDATE + {WM_POINTERROUTEDRELEASED, "WM_POINTERROUTEDRELEASED", true}, +#endif // WM_POINTERROUTEDTO }; static inline const MessageDebugEntry *messageDebugEntry(UINT msg)