Re: comctl32: Get rid of TOOLTIPS_SetMargin(), it is just a RECT assignment.
On 19.07.2016 10:53, Michael Stefaniuc wrote:
Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> --- dlls/comctl32/tooltips.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index eed113e..a0c7ade 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -1599,18 +1599,6 @@ TOOLTIPS_SetDelayTime (TOOLTIPS_INFO *infoPtr, DWORD duration, INT nTime) }
-static LRESULT -TOOLTIPS_SetMargin (TOOLTIPS_INFO *infoPtr, const RECT *lpRect) -{ - infoPtr->rcMargin.left = lpRect->left; - infoPtr->rcMargin.right = lpRect->right; - infoPtr->rcMargin.bottom = lpRect->bottom; - infoPtr->rcMargin.top = lpRect->top; - - return 0; -} - - static inline LRESULT TOOLTIPS_SetMaxTipWidth (TOOLTIPS_INFO *infoPtr, INT MaxWidth) { @@ -2261,7 +2249,8 @@ TOOLTIPS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return TOOLTIPS_SetDelayTime (infoPtr, (DWORD)wParam, (INT)LOWORD(lParam));
case TTM_SETMARGIN: - return TOOLTIPS_SetMargin (infoPtr, (LPRECT)lParam); + infoPtr->rcMargin = *(RECT*)lParam; + return 0;
case TTM_SETMAXTIPWIDTH: return TOOLTIPS_SetMaxTipWidth (infoPtr, (INT)lParam);
I think this needs test to see if any rectangle is accepted, for example with negative values. If we need to validate it, it's easier to do in a helper to match the rest of code.
participants (1)
-
Nikolay Sivov