Corrected and simplified handling of mouse pointers.