From d944af860934fdf8a3a38fc48a0b158428d90a0f Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 14 Aug 2014 16:00:31 -0400 Subject: Split out common container window procedure code in Windows to its own function. --- redo/container_windows.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'redo/container_windows.c') diff --git a/redo/container_windows.c b/redo/container_windows.c index f92459c..4d5215a 100644 --- a/redo/container_windows.c +++ b/redo/container_windows.c @@ -15,10 +15,7 @@ static LRESULT CALLBACK containerWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LP { void *data; RECT r; - HDC dc; - PAINTSTRUCT ps; - HWND parent; - POINT client; + LRESULT shared; data = (void *) GetWindowLongPtrW(hwnd, GWLP_USERDATA); if (data == NULL) { @@ -31,12 +28,9 @@ static LRESULT CALLBACK containerWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LP // act as if we're not ready yet, even during WM_NCCREATE (nothing important to the switch statement below happens here anyway) return DefWindowProcW(hwnd, uMsg, wParam, lParam); } - + if (sharedWndProc(hwnd, uMsg, wParam, lParam, &shared)) + return shared; switch (uMsg) { - case WM_COMMAND: - return forwardCommand(hwnd, uMsg, wParam, lParam); - case WM_NOTIFY: - return forwardNotify(hwnd, uMsg, wParam, lParam); case WM_SIZE: if (GetClientRect(hwnd, &r) == 0) xpanic("error getting client rect for Window in WM_SIZE", GetLastError()); -- cgit v1.2.3