Warning, /graphics/krita/3rdparty/ext_qt/0030-Make-sure-if-WinInk-is-correctly-initialized-if-wint.patch is written in an unsupported language. File is not indexed.

0001 From 11ae6a1706716d3772a15a98ccca0d4ae4b08fde Mon Sep 17 00:00:00 2001
0002 From: Dmitry Kazakov <dimula73@gmail.com>
0003 Date: Tue, 1 Sep 2020 11:59:23 +0300
0004 Subject: [PATCH 11/47] Make sure if WinInk is correctly initialized if
0005  wintab.dll is not found
0006 
0007 If the app requests WinTab, but the library is not found, WinInk sould
0008 still be fully initialized.
0009 ---
0010  .../platforms/windows/qwindowsintegration.cpp | 19 +++++++++++++------
0011  1 file changed, 13 insertions(+), 6 deletions(-)
0012 
0013 diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
0014 index d2d12ff7e5..47b2bbeb02 100644
0015 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp
0016 +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
0017 @@ -237,17 +237,24 @@ QWindowsIntegrationPrivate::QWindowsIntegrationPrivate(const QStringList &paramL
0018      QWindowsFontDatabase::setFontOptions(m_options);
0019  
0020      if (QCoreApplication::testAttribute(Qt::AA_MSWindowsUseWinTabAPI)) {
0021 -        m_options |= QWindowsIntegration::DontUseWMPointer;
0022 +        if (m_context.initTablet(m_options)) {
0023 +            m_options |= QWindowsIntegration::DontUseWMPointer;
0024 +            if (tabletAbsoluteRange >= 0)
0025 +                m_context.setTabletAbsoluteRange(tabletAbsoluteRange);
0026 +        } else {
0027 +            QCoreApplication::setAttribute(Qt::AA_MSWindowsUseWinTabAPI, false);
0028 +        }
0029      }
0030  
0031      if (m_context.initPointer(m_options)) {
0032          QCoreApplication::setAttribute(Qt::AA_CompressHighFrequencyEvents);
0033 -    } else {
0034 -        if (m_context.initTablet(m_options))
0035 +    } else if (!QCoreApplication::testAttribute(Qt::AA_MSWindowsUseWinTabAPI)) {
0036 +        if (m_context.initTablet(m_options)) {
0037 +            m_options |= QWindowsIntegration::DontUseWMPointer;
0038              QCoreApplication::setAttribute(Qt::AA_MSWindowsUseWinTabAPI);
0039 -
0040 -        if (tabletAbsoluteRange >= 0)
0041 -            m_context.setTabletAbsoluteRange(tabletAbsoluteRange);
0042 +            if (tabletAbsoluteRange >= 0)
0043 +                m_context.setTabletAbsoluteRange(tabletAbsoluteRange);
0044 +        }
0045      }
0046  
0047      if (!dpiAwarenessSet) { // Set only once in case of repeated instantiations of QGuiApplication.
0048 -- 
0049 2.20.1.windows.1
0050