fix a problem in mouse event processing that interferes with selecting the scan rectangle in the preview window (#624190, patch by Reinhard Fössmeier)