diff options
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsintegration.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsintegration.cpp | 37 |
1 files changed, 7 insertions, 30 deletions
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index ea077bc695..aeafff9962 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -139,7 +139,6 @@ struct QWindowsIntegrationPrivate ~QWindowsIntegrationPrivate(); unsigned m_options = 0; - int m_tabletAbsoluteRange = -1; QWindowsContext m_context; QPlatformFontDatabase *m_fontDatabase = nullptr; #if QT_CONFIG(clipboard) @@ -242,16 +241,16 @@ QWindowsIntegrationPrivate::QWindowsIntegrationPrivate(const QStringList ¶mL // Default to per-monitor awareness to avoid being scaled when monitors with different DPI // are connected to Windows 8.1 QtWindows::ProcessDpiAwareness dpiAwareness = QtWindows::ProcessPerMonitorDpiAware; - m_options = parseOptions(paramList, &m_tabletAbsoluteRange, &dpiAwareness); + int tabletAbsoluteRange = -1; + m_options = parseOptions(paramList, &tabletAbsoluteRange, &dpiAwareness); QWindowsFontDatabase::setFontOptions(m_options); + if (tabletAbsoluteRange >= 0) + QWindowsContext::setTabletAbsoluteRange(tabletAbsoluteRange); - if (m_context.initPointer(m_options)) { + if (m_context.initPointer(m_options)) QCoreApplication::setAttribute(Qt::AA_CompressHighFrequencyEvents); - } else { - m_context.initTablet(m_options); - if (m_tabletAbsoluteRange >= 0) - m_context.setTabletAbsoluteRange(m_tabletAbsoluteRange); - } + else + m_context.initTablet(); if (!dpiAwarenessSet) { // Set only once in case of repeated instantiations of QGuiApplication. if (!QCoreApplication::testAttribute(Qt::AA_PluginApplication)) { @@ -650,28 +649,6 @@ void QWindowsIntegration::beep() const MessageBeep(MB_OK); // For QApplication } -bool QWindowsIntegration::setWinTabEnabled(bool enabled) -{ - bool ret = false; - if (QWindowsIntegration *p = QWindowsIntegration::instance()) { - if (enabled) { - if (p->d->m_context.tabletSupport()) { - ret = true; - } else { - ret = p->d->m_context.initTablet(p->d->m_options); - if (ret && p->d->m_tabletAbsoluteRange >= 0) - p->d->m_context.setTabletAbsoluteRange(p->d->m_tabletAbsoluteRange); - } - } else { - if (p->d->m_context.tabletSupport()) - ret = p->d->m_context.disposeTablet(); - else - ret = true; - } - } - return ret; -} - #if QT_CONFIG(vulkan) QPlatformVulkanInstance *QWindowsIntegration::createPlatformVulkanInstance(QVulkanInstance *instance) const { |