diff options
Diffstat (limited to 'src/plugins/platforms/windows/qwindowscontext.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowscontext.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index b1658d4d8e..39278f31e8 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -366,12 +366,18 @@ bool QWindowsContext::initTouch(unsigned integrationOptions) d->m_systemInfo |= QWindowsContext::SI_SupportsTouch; // A touch device was plugged while the app is running. Register all windows for touch. - if (QGuiApplicationPrivate::is_app_running) { + registerTouchWindows(); + + return true; +} + +void QWindowsContext::registerTouchWindows() +{ + if (QGuiApplicationPrivate::is_app_running + && (d->m_systemInfo & QWindowsContext::SI_SupportsTouch) != 0) { for (QWindowsWindow *w : qAsConst(d->m_windows)) w->registerTouchWindow(); } - - return true; } bool QWindowsContext::initTablet() |