https://bugs.kde.org/show_bug.cgi?id=406520
Bug ID: 406520 Summary: Qt's WinTab impl may map wrong screen geometry on some devices Product: krita Version: git master Platform: MS Windows OS: MS Windows Status: REPORTED Severity: normal Priority: NOR Component: tablet support Assignee: krita-bugs-n...@kde.org Reporter: al...@alvinhc.com Target Milestone: --- This issue is specific to Qt's WinTab implementation with the mouse mode hack disabled in Qt (from 6806b44ec2122eb6b8ff531d5bf94e89d0dc31cc). Qt assumes the WinTab coordinates are mapped to the whole virtual screen, but this is not true for all WinTab driver implementations, and thus will cause tablet offset for some users. Tested on a SP5 with Microsoft's WinTab driver, with a secondary monitor attached: This setup works fine on Krita 4.1.7. The following is the debug output from the WinTab code: [8300] krita.tabletlog: # Getting current context data: [8300] krita.tabletlog: lc.lcName = 0x5fbf30 [8300] krita.tabletlog: lc.lcDevice = 0 [8300] krita.tabletlog: lc.lcInOrgX = 0 [8300] krita.tabletlog: lc.lcInOrgY = 0 [8300] krita.tabletlog: lc.lcInExtX = 9600 [8300] krita.tabletlog: lc.lcInExtY = 7200 [8300] krita.tabletlog: lc.lcOutOrgX = 0 [8300] krita.tabletlog: lc.lcOutOrgY = 0 [8300] krita.tabletlog: lc.lcOutExtX = 9600 [8300] krita.tabletlog: lc.lcOutExtY = -7200 [8300] krita.tabletlog: lc.lcSysOrgX = 0 [8300] krita.tabletlog: lc.lcSysOrgY = 0 [8300] krita.tabletlog: lc.lcSysExtX = 2736 [8300] krita.tabletlog: lc.lcSysExtY = 1824 [8300] krita.tabletlog: Qt Desktop Geometry QRect(0,0 4656x1815) [8300] qtDesktopRect = QRect(0,0 4656x1815) [8300] wintabDesktopRect = QRect(0,0 2736x1824) You can see that the WinTab driver maps the tablet input only to the primary screen, which voids Qt's assumption. Testing with a fresh build of 70ac5d1466cc286273e17186f91a13fa515c3e51 with the same setup, there is a huge offset with pen input. If I run this build with the env var `QT_WINTAB_DESKTOP_RECT=0;0;2736;1824", the WinTab input works. This doesn't necessarily mean that `lcSys*` will always give the correct mapping, but IMO it does show the need for some users to conveniently set the screen mapping if it goes wrong. -- You are receiving this mail because: You are watching all bug changes.