Avoid unnecessary cached display information updates

Only invalidate display cache when something related to the displays has
changed and not whenever any system option has.

This should avoid completely unnecessary refreshes when a UAC prompt is
shown, for example: even if doing this works now, after the previous
commit, we still don't have to do it at all.
This commit is contained in:
Vadim Zeitlin
2019-03-31 13:22:30 +02:00
parent f3c5923e1a
commit 3959810d42

View File

@@ -524,7 +524,8 @@ bool wxDisplayMSW::ChangeMode(const wxVideoMode& mode)
LRESULT APIENTRY
wxDisplayWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
if ( msg == WM_SETTINGCHANGE || msg == WM_DISPLAYCHANGE )
if ( (msg == WM_SETTINGCHANGE && wParam == SPI_SETWORKAREA) ||
msg == WM_DISPLAYCHANGE )
{
wxDisplay::InvalidateCache();