Module: wine Branch: master Commit: 4e8844529c5ea361ad6a0b5ac19d28cb88670456 URL: https://gitlab.winehq.org/wine/wine/-/commit/4e8844529c5ea361ad6a0b5ac19d28c...
Author: Rémi Bernon rbernon@codeweavers.com Date: Thu Oct 13 21:17:54 2022 +0200
win32u: Asynchronously send the WM_DISPLAYCHANGE to the desktop window.
---
dlls/win32u/message.c | 2 +- dlls/win32u/sysparams.c | 4 ++-- dlls/win32u/win32u_private.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index 51967d2598a..caffd837c8b 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -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;
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 1c81dda9dd3..6b5a6f65aef 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -2487,8 +2487,8 @@ static LONG apply_display_settings( const WCHAR *devname, const DEVMODEW *devmod user_driver->pGetCurrentDisplaySettings( adapter->dev.device_name, ¤t_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 ); diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 298cafcf7bf..4be068b968d 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -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 );