only send mouse events if the window is visible

Change-Id: I2564159cd21e068c0893fc96d1c7e90746788f39
some fixes for positioning problems

Change-Id: I4e970837ebe6867458e4a75c7cc323f8f6b3ecc8