提交 f16eddbd 编写于 作者: N Night

window: adjust code and delete useless code

1. adjust code.
2. delete useless annotation
上级 4648c2a1
......@@ -511,7 +511,6 @@ std::shared_ptr<wm::Window> Platform::create_window(
auto id = next_window_id();
auto w = std::make_shared<Window>(renderer_, id, task, shared_from_this(), frame, title, !window_size_immutable_);
focused_sdl_window_id_ = w->window_id();
printf("Insert id:%d, %d\n", id, task);
windows_.insert({id, w});
return w;
}
......@@ -524,7 +523,6 @@ void Platform::window_deleted(const Window::Id &id) {
}
if (auto window = w->second.lock())
window_manager_->remove_task(window->task());
printf("Remove id:%d\n", id);
windows_.erase(w);
}
......
......@@ -267,7 +267,6 @@ void Window::process_event(const SDL_Event &event) {
case SDL_WINDOWEVENT_CLOSE:
if (observer_)
observer_->window_deleted(id_);
close();
break;
default:
......
......@@ -61,7 +61,7 @@ void MultiWindowManager::apply_window_state_update(const WindowState::List &upda
}
if (window.frame().width() == 0 || window.frame().height() == 0) {
continue;
continue;
}
auto title = window.package_name();
......@@ -135,11 +135,11 @@ void MultiWindowManager::insert_task(const Task::Id &task, std::shared_ptr<wm::W
}
void MultiWindowManager::erase_task(const Task::Id &task) {
std::lock_guard<std::mutex>l(mutex_);
std::lock_guard<std::mutex> l(mutex_);
auto it = windows_.find(task);
if (it != windows_.end()) {
windows_.erase(it);
}
}
}
} // namespace wm
} // namespace anbox
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册