From 58540b2b2bc31daaa004f43fdf9b84c1cf8aa400 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 5 May 2015 20:56:07 -0400 Subject: [PATCH] Changed from GetWindowRect() in windows/contianer.c to get the parent's client size to GetClientRect(); we're only interested in the size, and WM_PRINTCLIENT is strictly for the client :/ It's still correct as far as I know (the old code used it). --- windows/container.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/windows/container.c b/windows/container.c index 69ccc360..54dd3d47 100644 --- a/windows/container.c +++ b/windows/container.c @@ -32,9 +32,8 @@ static HBRUSH getControlBackgroundBrush(HWND hwnd, HDC dc, RECT *hwndScreenRect) break; } - // TODO get client rect instead? - if (GetWindowRect(parent, &parentRect) == 0) - logLastError("error getting parent's window rect in getControlBackgroundBrush()"); + if (GetClientRect(parent, &parentRect) == 0) + logLastError("error getting parent's client rect in getControlBackgroundBrush()"); cdc = CreateCompatibleDC(dc); if (cdc == NULL)