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:
@@ -524,7 +524,8 @@ bool wxDisplayMSW::ChangeMode(const wxVideoMode& mode)
|
|||||||
LRESULT APIENTRY
|
LRESULT APIENTRY
|
||||||
wxDisplayWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
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();
|
wxDisplay::InvalidateCache();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user