win32u: Force update display cache after NtUserChangeDisplaySettingsEx.

This commit is contained in:
Rémi Bernon 2022-09-27 11:24:13 +02:00 committed by Alexandre Julliard
parent 8a9c34edb5
commit 0f1d8329f0
3 changed files with 4 additions and 5 deletions

View file

@ -2443,6 +2443,9 @@ static LONG apply_display_settings( const WCHAR *devname, const DEVMODEW *devmod
free( displays );
if (ret) return ret;
if (!update_display_cache( TRUE ))
WARN( "Failed to update display cache after mode change.\n" );
if ((adapter = find_adapter( NULL )))
{
DEVMODEW current_mode = {.dmSize = sizeof(DEVMODEW)};

View file

@ -830,9 +830,7 @@ LONG macdrv_ChangeDisplaySettings(LPDEVMODEW displays, HWND hwnd, DWORD flags, L
bpp, mode->dmDisplayFrequency);
ret = DISP_CHANGE_BADMODE;
}
else if (macdrv_set_display_mode(&macdrv_displays[0], best_display_mode))
macdrv_init_display_devices(TRUE);
else
else if (!macdrv_set_display_mode(&macdrv_displays[0], best_display_mode))
{
WARN("Failed to set display mode\n");
ret = DISP_CHANGE_FAILED;

View file

@ -418,8 +418,6 @@ LONG X11DRV_ChangeDisplaySettings( LPDEVMODEW displays, HWND hwnd, DWORD flags,
ret = apply_display_settings( displays, ids, FALSE );
if (ret == DISP_CHANGE_SUCCESSFUL)
ret = apply_display_settings( displays, ids, TRUE );
if (ret == DISP_CHANGE_SUCCESSFUL)
X11DRV_DisplayDevices_Init(TRUE);
done:
free( ids );