x11 mouse events improvement