The seat and tablet cursor functions are very similar, factorize the commonalities to simplify the code and reduce the copy/paste. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>