widgets: Adjust widget selection code as per 92979c51a61d
Mouse coordinates in mouse events have been changed so they always are relative to the widget receiving the event and not as before relative to the source widget.
widget: Fix segfault