Does two main changes:
* Handle regions in the order as visible on screen. Practically this
just means handling overlapping regions before non-overlapping ones.
* Don't handle any other regions after having found one containing the
mouse pointer.
Like T92364 suggests, this patch changes the clickable area from this:
{F11320410}
To almost exactly this:
{F11320413}