diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2007-12-30 20:13:36 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2007-12-30 20:13:36 +0300 |
commit | 93058ac3b3749eae4a595e66365946d112ee321d (patch) | |
tree | 349328dd930172663b2985e3b360cb7742a42a7d /intern | |
parent | 1039bc26fb466e41cea11bb77ed7b3b2d335f594 (diff) |
* handle WM_MOVE on win32 in GHOST
* change window move/size handling so that getWindowBounds gets x,y for window and getClientBounds gets w,h
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWin32.cpp | 5 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowCarbon.cpp | 4 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 1 |
3 files changed, 8 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index 835f7da3038..5abaf78472e 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -750,6 +750,8 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, * message without calling DefWindowProc. */ event = processWindowEvent(GHOST_kEventWindowSize, window); + ::ValidateRect(hwnd, NULL); + break; case WM_CAPTURECHANGED: window->lostMouseCapture(); break; @@ -772,6 +774,9 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, * to perform any move or size change processing during the WM_WINDOWPOSCHANGED * message without calling DefWindowProc. */ + event = processWindowEvent(GHOST_kEventWindowMove, window); + ::ValidateRect(hwnd, NULL); + break; case WM_ERASEBKGND: /* An application sends the WM_ERASEBKGND message when the window background must be * erased (for example, when a window is resized). The message is sent to prepare an diff --git a/intern/ghost/intern/GHOST_WindowCarbon.cpp b/intern/ghost/intern/GHOST_WindowCarbon.cpp index 0473b16335a..7d6aded6f72 100644 --- a/intern/ghost/intern/GHOST_WindowCarbon.cpp +++ b/intern/ghost/intern/GHOST_WindowCarbon.cpp @@ -255,8 +255,8 @@ void GHOST_WindowCarbon::getClientBounds(GHOST_Rect& bounds) const { Rect rect; GHOST_ASSERT(getValid(), "GHOST_WindowCarbon::getClientBounds(): window invalid") -// ::GetPortBounds(m_grafPtr, &rect); - ::GetWindowBounds(m_windowRef, kWindowContentRgn, &rect); + ::GetPortBounds(m_grafPtr, &rect); + //::GetWindowBounds(m_windowRef, kWindowContentRgn, &rect); bounds.m_b = rect.bottom; bounds.m_l = rect.left; diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index ef7294c2354..6f6e113dccd 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -293,6 +293,7 @@ void GHOST_WindowWin32::getClientBounds(GHOST_Rect& bounds) const { RECT rect; ::GetClientRect(m_hWnd, &rect); + //::GetWindowRect(m_hWnd, &rect); bounds.m_b = rect.bottom; bounds.m_l = rect.left; bounds.m_r = rect.right; |