Windows: Do not register windows obtained by QWindow::fromWinId() for touch.

Fixes a warning:
RegisterTouchWindow() failed for window ''. (Access is denied.)

Task-number: QTBUG-43252
Change-Id: I92a565f3a5e2e8815eb709b5c6d0ccdba7330e31
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Friedemann Kleint 2014-12-11 13:18:07 +01:00
parent 994bbcf1df
commit d61ee49df4

View File

@ -890,7 +890,8 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const QWindowsWindowData &data)
updateDropSite();
#ifndef Q_OS_WINCE
if (QWindowsContext::instance()->systemInfo() & QWindowsContext::SI_SupportsTouch) {
if ((QWindowsContext::instance()->systemInfo() & QWindowsContext::SI_SupportsTouch)
&& aWindow->type() != Qt::ForeignWindow) {
if (QWindowsContext::user32dll.registerTouchWindow(m_data.hwnd, 0)) {
setFlag(TouchRegistered);
} else {