提交 475ca1c8 编写于 作者: N night_xiaoye

window: solve problem. One app will create more than one windows, and destroy

them until one.

When platform create window is not finished, multi_window_manager will post
more than one create window message event.
note: Windows destroy mast so user can not sense it.
上级 6c1a4251
......@@ -265,6 +265,9 @@ void Platform::user_event_function(const SDL_Event &event) {
manager_window_param* param = (manager_window_param*) event.user.data1;
if (param) {
if (event_type == USER_CREATE_WINDOW) {
if (windows_.find(param->windowId) != windows_.end()) {
return;
}
auto w = create_window(param->windowId, param->rect, param->title);
if (w) {
w->attach();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册