Commit ba143493 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

win32u: Send WM_DISPLAYCHANGE message to the desktop window.

And pass it down to the drivers DesktopWindowProc entry.
parent c70b34e3
...@@ -83,6 +83,7 @@ LRESULT WINAPI DesktopWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lP ...@@ -83,6 +83,7 @@ LRESULT WINAPI DesktopWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lP
case WM_NCCREATE: case WM_NCCREATE:
case WM_NCCALCSIZE: case WM_NCCALCSIZE:
case WM_PARENTNOTIFY: case WM_PARENTNOTIFY:
case WM_DISPLAYCHANGE:
return NtUserMessageCall( hwnd, message, wParam, lParam, 0, NtUserDesktopWindowProc, FALSE ); return NtUserMessageCall( hwnd, message, wParam, lParam, 0, NtUserDesktopWindowProc, FALSE );
default: default:
......
...@@ -2953,7 +2953,8 @@ LRESULT desktop_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ) ...@@ -2953,7 +2953,8 @@ LRESULT desktop_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
} }
case WM_NCCALCSIZE: case WM_NCCALCSIZE:
return 0; return 0;
case WM_DISPLAYCHANGE:
return user_driver->pDesktopWindowProc( hwnd, msg, wparam, lparam );
default: default:
if (msg >= WM_USER && hwnd == get_desktop_window()) if (msg >= WM_USER && hwnd == get_desktop_window())
return user_driver->pDesktopWindowProc( hwnd, msg, wparam, lparam ); return user_driver->pDesktopWindowProc( hwnd, msg, wparam, lparam );
......
...@@ -2487,6 +2487,8 @@ static LONG apply_display_settings( const WCHAR *devname, const DEVMODEW *devmod ...@@ -2487,6 +2487,8 @@ static LONG apply_display_settings( const WCHAR *devname, const DEVMODEW *devmod
user_driver->pGetCurrentDisplaySettings( adapter->dev.device_name, &current_mode ); user_driver->pGetCurrentDisplaySettings( adapter->dev.device_name, &current_mode );
adapter_release( adapter ); adapter_release( adapter );
send_message( NtUserGetDesktopWindow(), WM_DISPLAYCHANGE, current_mode.dmBitsPerPel,
MAKELPARAM( current_mode.dmPelsWidth, current_mode.dmPelsHeight ) );
send_message_timeout( HWND_BROADCAST, WM_DISPLAYCHANGE, current_mode.dmBitsPerPel, send_message_timeout( HWND_BROADCAST, WM_DISPLAYCHANGE, current_mode.dmBitsPerPel,
MAKELPARAM( current_mode.dmPelsWidth, current_mode.dmPelsHeight ), MAKELPARAM( current_mode.dmPelsWidth, current_mode.dmPelsHeight ),
SMTO_ABORTIFHUNG, 2000, FALSE ); SMTO_ABORTIFHUNG, 2000, FALSE );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment