Check geometry correctly when replaying popup mouse events.

Task-number: QTBUG-41869
Task-number: QTBUG-39313
Change-Id: I2b59f5db6f0ae4007b1a3b58a79eed958e662272
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>