Smudge adjustment and patch for Qt tablet in relative mode

My tablet was not responding as expected due to a Qt 4.8 bug
(the famous Wacom tablet in relative mode conflict) 
but I found a solution: the changed line does exactly the same job
although preventing from large coordinate differences.