Author: gadamopoulos Date: Tue Oct 18 10:54:13 2011 New Revision: 54186
URL: http://svn.reactos.org/svn/reactos?rev=54186&view=rev Log: [win32k] -Force all top level windows to update the size and position of their non client area when SPI_SETNONCLIENTMETRICS is used -Should fix changing the non client metrics like caption height for open windows (before this we needed to close and reopen existing windows to let them be painted properly)
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c [iso-8859-1] Tue Oct 18 10:54:13 2011 @@ -694,6 +694,41 @@ return (UINT_PTR)KEY_DESKTOP; }
+static BOOL +SpiNotifyNCMetricsChanged() +{ + PWND pwndDesktop, pwndCurrent; + HWND *ahwnd; + USER_REFERENCE_ENTRY Ref; + int i; + + pwndDesktop = UserGetDesktopWindow(); + ASSERT(pwndDesktop); + + ahwnd = IntWinListChildren(pwndDesktop); + if(!ahwnd) + return FALSE; + + for (i = 0; ahwnd[i]; i++) + { + pwndCurrent = UserGetWindowObject(ahwnd[i]); + if(!pwndCurrent) + continue; + + UserRefObjectCo(pwndCurrent, &Ref); + co_WinPosSetWindowPos(pwndCurrent, 0, pwndCurrent->rcWindow.left,pwndCurrent->rcWindow.top, + pwndCurrent->rcWindow.right-pwndCurrent->rcWindow.left + ,pwndCurrent->rcWindow.bottom - pwndCurrent->rcWindow.top, + SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS| + SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW); + UserDerefObjectCo(pwndCurrent); + } + + ExFreePool(ahwnd); + + return TRUE; +} + static UINT_PTR SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl) @@ -863,6 +898,8 @@ SpiStoreFont(L"StatusFont", &gspv.ncm.lfStatusFont); SpiStoreFont(L"MessageFont", &gspv.ncm.lfMessageFont); } + if(!SpiNotifyNCMetricsChanged()) + return 0; return (UINT_PTR)KEY_METRIC;
case SPI_GETMINIMIZEDMETRICS: