Don't allow mouse events if pen is pressed
BUG: 391346 (cherry picked from commit 1eb8b965f9eafd84e5e1a42189be3e21af4381a0)