From 09a06c717174fa718280a47021b5c4bea6772e66 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 20 Mar 2015 09:45:17 +0100 Subject: [PATCH] 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 --- src/plugins/platforms/windows/qwindowswindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 2fd0f12c26..29da3328b0 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -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);