Handle the situation when primary display is not the first one. See https://github.com/wxWidgets/wxWidgets/pull/1641