From 3959810d42fd3d0cd8d3a8bafa346fcfa5ed8e23 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 31 Mar 2019 13:22:30 +0200 Subject: [PATCH] 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. --- src/msw/display.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/msw/display.cpp b/src/msw/display.cpp index 6c783971be..9f1892f07d 100644 --- a/src/msw/display.cpp +++ b/src/msw/display.cpp @@ -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();