Load Wintab button mapping only once.
ClosedPublic

Authored by abrahams on Mar 19 2016, 5:33 AM.

Details

Summary

This prevents Krita from losing its Wintab button map, at the cost of
requiring Krita to be restarted (or else a new option to be added
allowing settings to be reset) when users change settings in the Wintab
driver.

BUG: 359561
BUG: 349422

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
abrahams updated this revision to Diff 2840.Mar 19 2016, 5:33 AM
abrahams retitled this revision from to Load Wintab button mapping only once..
abrahams updated this object.
abrahams edited the test plan for this revision. (Show Details)
abrahams added a reviewer: Krita.
abrahams added a comment.EditedMar 19 2016, 5:36 AM

I think this is caused by a bug in the Wintab driver or at the very least a hideously ugly corner case. It seems wTInfo may return the wrong logical button map if Krita is not in focus but the tablet is used in Krita's window. The strange part is that wtInfo will then continue to send this bad button map even after you focus Krita and do another query after entering proximity.

(I also believe either the Wintab driver or Qt has a numerical error in the cursor mapping calculation. I'm quite certain the scaling in the Wintab code works correctly, but the cursor events generated by the driver and processed by Qt are consistently off by 3-5 pixels.)

rempt accepted this revision.Mar 20 2016, 9:06 AM
rempt added a reviewer: rempt.
rempt added a subscriber: rempt.

I'm fine with that limitation, and it would be really good to have those two bugs fixed!

This revision is now accepted and ready to land.Mar 20 2016, 9:06 AM
In D1174#22463, @rempt wrote:

I'm fine with that limitation, and it would be really good to have those two bugs fixed!

OK, if people start complaining it would probably be straightforward to add a menu option like "Reload tablet settings." But restarting Krita is practically as easy as that.

This revision was automatically updated to reflect the committed changes.