[WIN32K]: Since r7146 (12 years ago) we correctly set a small Close button for tool windows. WARNING: Please do NOT sync this piece of code with Wine! Ours behave better when one changes the values of SM_CXSMSIZE / SM_CYSMSIZE.

svn path=/trunk/; revision=70720
This commit is contained in:
Hermès Bélusca-Maïto 2016-02-12 23:10:59 +00:00
parent fe53065a4e
commit b4741c36f4

View file

@ -689,7 +689,7 @@ UserHasMenu(PWND pWnd, ULONG Style)
* FIXME:
* - Cache bitmaps, then just bitblt instead of calling DFC() (and
* wasting precious CPU cycles) every time
* - Center the buttons verticaly in the rect
* - Center the buttons vertically in the rect
*/
VOID
UserDrawCaptionButton(PWND pWnd, LPRECT Rect, DWORD Style, DWORD ExStyle, HDC hDC, BOOL bDown, ULONG Type)
@ -751,8 +751,7 @@ UserDrawCaptionButton(PWND pWnd, LPRECT Rect, DWORD Style, DWORD ExStyle, HDC hD
PMENU pSysMenu = IntGetSystemMenu(pWnd, FALSE);
UINT MenuState = IntGetMenuState(UserHMGetHandle(pSysMenu), SC_CLOSE, MF_BYCOMMAND); /* in case of error MenuState==0xFFFFFFFF */
/* FIXME: A tool window has a smaller Close button */
/* A tool window has a smaller Close button */
if (ExStyle & WS_EX_TOOLWINDOW)
{
TempRect.left = TempRect.right - UserGetSystemMetrics(SM_CXSMSIZE);