From 70fcffe67a555f91cc738178450e9c36cf11ef51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 4 Jun 2016 23:34:46 +0000 Subject: [PATCH] [SHELL32] - Pass indistinctly WM_SYSCOLORCHANGE and WM_SETTINGCHANGE messages sent to the shell progman window, down to its children windows (SHELLDLL_DefView and its associated ListView), as shown by tracking windows messages on Win2k3. - If we receive a WM_SETTINGCHANGE with wParam == SPI_SETWORKAREA, i.e. the desktop working area was modified, we need to resize the underlying DefView, as shown by tracking windows messages on Win2k3. For the moment we implement support for only the primary monitor. CORE-11375 #resolve CORE-5618 #resolve CORE-5620 svn path=/trunk/; revision=71525 --- .../shell32/shelldesktop/CDesktopBrowser.cpp | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp b/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp index 9a56ff97b2d..7d51b0f441b 100644 --- a/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp +++ b/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp @@ -476,16 +476,29 @@ LRESULT CALLBACK CDesktopBrowser::ProgmanWindowProc(IN HWND hwnd, IN UINT uMsg, case WM_SYSCOLORCHANGE: case WM_SETTINGCHANGE: { - if (uMsg == WM_SYSCOLORCHANGE || wParam == SPI_SETDESKWALLPAPER || wParam == 0) + if (pThis->hWndShellView != NULL) { - if (pThis->hWndShellView != NULL) - { - /* Forward the message */ - SendMessageW(pThis->hWndShellView, - uMsg, - wParam, - lParam); - } + /* Forward the message */ + SendMessageW(pThis->hWndShellView, + uMsg, + wParam, + lParam); + } + + if (uMsg == WM_SETTINGCHANGE && wParam == SPI_SETWORKAREA && + pThis->hWndShellView != NULL) + { + RECT rcWorkArea; + + // FIXME: Add support for multi-monitor! + SystemParametersInfoW(SPI_GETWORKAREA, + 0, &rcWorkArea, 0); + + SetWindowPos(pThis->hWndShellView, NULL, + rcWorkArea.left, rcWorkArea.top, + rcWorkArea.right - rcWorkArea.left, + rcWorkArea.bottom - rcWorkArea.top, + SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER); } break; }