This allows it to take into the overlays into consideration when deciding which cursor is to be shown.