Windows: Fix touch registration.
IsTouchWindow() returns false for windows that have not yet been registered for touch and the code bailed out. Fix the check so that registration is only suppressed when the flags match. Change-Id: Ia1e88553d2fd8f9acc4e3b9c5f4af6cdbe93b3f6 Task-number: QTBUG-45134 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This commit is contained in:
parent
97edc8ede2
commit
09a06c7171
@ -2298,7 +2298,7 @@ void QWindowsWindow::registerTouchWindow(QWindowsWindowFunctions::TouchWindowTou
|
||||
const bool ret = QWindowsContext::user32dll.isTouchWindow(m_data.hwnd, &touchFlags);
|
||||
// Return if it is not a touch window or the flags are already set by a hook
|
||||
// such as HCBT_CREATEWND
|
||||
if (!ret || touchFlags != 0)
|
||||
if (ret || touchFlags != 0)
|
||||
return;
|
||||
if (QWindowsContext::user32dll.registerTouchWindow(m_data.hwnd, (ULONG)touchTypes))
|
||||
setFlag(TouchRegistered);
|
||||
|
Loading…
Reference in New Issue
Block a user