Windows QPA: Fix building with -no-feature-tabletevent

This change fixes building Qt with the -no-feature-tabletevent configure
option by disabling handling of pointer messages associated with tablet
events within the pointer message handler.

Fixes: QTBUG-71774
Change-Id: Icb47a39793edb9a0f87c07c656b6ea6573d5f947
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Andre de la Rocha 2018-11-14 12:49:00 +01:00 committed by Liang Qi
parent c3d2d83fcb
commit a94a3098d0

View File

@ -609,6 +609,7 @@ bool QWindowsPointerHandler::translateTouchEvent(QWindow *window, HWND hwnd,
bool QWindowsPointerHandler::translatePenEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et,
MSG msg, PVOID vPenInfo)
{
#if QT_CONFIG(tabletevent)
if (et & QtWindows::NonClientEventFlag)
return false; // Let DefWindowProc() handle Non Client messages.
@ -703,6 +704,14 @@ bool QWindowsPointerHandler::translatePenEvent(QWindow *window, HWND hwnd, QtWin
}
}
return true;
#else
Q_UNUSED(window);
Q_UNUSED(hwnd);
Q_UNUSED(et);
Q_UNUSED(msg);
Q_UNUSED(vPenInfo);
return false;
#endif
}
// Process old-style mouse messages here.