[BUG #8116] Fixed simulated mouse event detection