mirror of
https://github.com/reactos/wine.git
synced 2025-02-03 10:43:30 +00:00
comctl32: rebar: Don't return rectangles with negative width or height in NCCalcSize.
This commit is contained in:
parent
a82b96f1b5
commit
1b8c98d35d
@ -4114,17 +4114,19 @@ inline static LRESULT
|
||||
REBAR_NCCalcSize (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HTHEME theme;
|
||||
RECT *rect = (RECT *)lParam;
|
||||
|
||||
if (infoPtr->dwStyle & WS_BORDER) {
|
||||
InflateRect((LPRECT)lParam, -GetSystemMetrics(SM_CXEDGE),
|
||||
-GetSystemMetrics(SM_CYEDGE));
|
||||
rect->left = min(rect->left + GetSystemMetrics(SM_CXEDGE), rect->right);
|
||||
rect->right = max(rect->right - GetSystemMetrics(SM_CXEDGE), rect->left);
|
||||
rect->top = min(rect->top + GetSystemMetrics(SM_CXEDGE), rect->bottom);
|
||||
rect->bottom = max(rect->bottom - GetSystemMetrics(SM_CXEDGE), rect->top);
|
||||
}
|
||||
else if ((theme = GetWindowTheme (infoPtr->hwndSelf)))
|
||||
{
|
||||
((LPRECT)lParam)->top++;
|
||||
rect->top = min(rect->top + 1, rect->bottom);
|
||||
}
|
||||
TRACE("new client=(%d,%d)-(%d,%d)\n",
|
||||
((LPRECT)lParam)->left, ((LPRECT)lParam)->top,
|
||||
((LPRECT)lParam)->right, ((LPRECT)lParam)->bottom);
|
||||
TRACE("new client=(%d,%d)-(%d,%d)\n", rect->left, rect->top, rect->right, rect->bottom);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user