On some tablets, WinTab doesn't seem to behave properly unless you reactivate the context on WM_ACTIVATE, and initialize context disabled (enable after open instead). Tested good with my Monoprice MP22 (Parblo Coast22) on Windows 10. Doesn't seem to affect Wacom. Formerly marked for T55589, but testing shows this is a separate fix.
Reading the spec and the code, it looks correct to me. My only concern is that in other places we use wintab functions we always check if they aren't NULL, we could do the same here just to be entirely sure.
@Antonio Vazquez (antoniov), in your tests, did it break anything? If not seems like we should just commit this even if it doesn't solve the surface issue.