Refresh wxDisplay when a monitor is added to or removed from the system.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 21 Sep 2011 15:07:35 +0000 (15:07 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 21 Sep 2011 15:07:35 +0000 (15:07 +0000)
commitad6f09f543cc0dbf657cac4a6242d263b9d760dd
tree2556aca3a69d7ec82bc020b8a270de454a67e4f1
parentb481194f519028fb10aa436e857c015eb253d688
Refresh wxDisplay when a monitor is added to or removed from the system.

If a monitor was attached or detached while a wx program was running, the
monitor handles stored in wxDisplayFactoryMSW became invalid and all display
operations (e.g. getting display size) failed from this moment onwards
requiring a program restart to work again.

Fix this by updating the monitor handles when we get WM_SETTINGCHANGE as it is
sent when a monitor is added or removed (while it's also sent in quite a few
other cases re-enumerating the monitors shouldn't take very long so just do it
always).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/msw/display.cpp