summaryrefslogtreecommitdiff
path: root/Editor/GUI/ContainerWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Editor/GUI/ContainerWindow.cpp')
-rw-r--r--Editor/GUI/ContainerWindow.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/Editor/GUI/ContainerWindow.cpp b/Editor/GUI/ContainerWindow.cpp
index 59cd008..f76ac73 100644
--- a/Editor/GUI/ContainerWindow.cpp
+++ b/Editor/GUI/ContainerWindow.cpp
@@ -96,19 +96,12 @@ LRESULT CALLBACK ContainerWindow::ContainerWndProc(HWND hWnd, UINT message, WPAR
case WM_WINDOWPOSCHANGED: // 窗口大小、位置、z层级改变,即窗口区域改变
{
+ //log_info_tag("WndProc", "WM_WINDOWPOSCHANGED" );
+
if (!self->m_IsClosing && !IsIconic(hWnd)) //IsIconic 窗口是否是最小化(图标化)
{
- // OnRectChanged()回调
- self->OnRectChanged();
+ self->OnSizeChanged();
}
- // WM_WINDOWPOSCHANGED 消息触发后且调用了DefWindowProc会接着发送WM_SIZE和WM_MOVE消息。在WM_WINDOWPOSCHANGED
- // 中一起处理大小和位置改变更高效
- /*
- By default, the DefWindowProc function sends the WM_SIZE and WM_MOVE messages to the window.
- The WM_SIZE and WM_MOVE messages are not sent if an application handles the WM_WINDOWPOSCHANGED
- message without calling DefWindowProc. It is more efficient to perform any move or size change
- processing during the WM_WINDOWPOSCHANGED message without calling DefWindowProc.
- */
break;
}
@@ -441,9 +434,15 @@ Vector2f ContainerWindow::GetSize()
return size;
}
-void ContainerWindow::OnRectChanged()
+void ContainerWindow::OnSizeChanged()
{
+ LuaBind::State state = GetVM()->GetCurThread();
+ LuaBind::MemberInvoker invoker = MemberInvoker(state, this);
+ invoker.member = m_Script;
+ invoker.method = "OnSizeChanged";
+ invoker.AddMember(m_Script);
+ invoker.Invoke(0);
}
void ContainerWindow::OnActivateApplication(bool active)