win32u: Asynchronously send the WM_DISPLAYCHANGE to the desktop window.

This commit is contained in:
Rémi Bernon 2022-10-13 21:17:54 +02:00 committed by Alexandre Julliard
parent a93edc8e6e
commit 4e8844529c
3 changed files with 4 additions and 3 deletions

View file

@ -3047,7 +3047,7 @@ LRESULT send_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
}
/* see SendNotifyMessageW */
static BOOL send_notify_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, BOOL ansi )
BOOL send_notify_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, BOOL ansi )
{
struct send_message_info info;

View file

@ -2487,8 +2487,8 @@ static LONG apply_display_settings( const WCHAR *devname, const DEVMODEW *devmod
user_driver->pGetCurrentDisplaySettings( adapter->dev.device_name, &current_mode );
adapter_release( adapter );
send_message( NtUserGetDesktopWindow(), WM_DISPLAYCHANGE, current_mode.dmBitsPerPel,
MAKELPARAM( current_mode.dmPelsWidth, current_mode.dmPelsHeight ) );
send_notify_message( NtUserGetDesktopWindow(), WM_DISPLAYCHANGE, current_mode.dmBitsPerPel,
MAKELPARAM( current_mode.dmPelsWidth, current_mode.dmPelsHeight ), FALSE );
send_message_timeout( HWND_BROADCAST, WM_DISPLAYCHANGE, current_mode.dmBitsPerPel,
MAKELPARAM( current_mode.dmPelsWidth, current_mode.dmPelsHeight ),
SMTO_ABORTIFHUNG, 2000, FALSE );

View file

@ -308,6 +308,7 @@ extern LRESULT send_internal_message_timeout( DWORD dest_pid, DWORD dest_tid, UI
LPARAM lparam, UINT flags, UINT timeout,
PDWORD_PTR res_ptr ) DECLSPEC_HIDDEN;
extern LRESULT send_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ) DECLSPEC_HIDDEN;
extern BOOL send_notify_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, BOOL ansi ) DECLSPEC_HIDDEN;
extern LRESULT send_message_timeout( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
UINT flags, UINT timeout, BOOL ansi );