提交 3d051a40 编写于 作者: S Simon Fels

Update window frame when window is moved rathern when state was updated

This leads to incorrect calculations of the layer position calculation
inside the window.
上级 c4664603
......@@ -237,6 +237,7 @@ void PlatformPolicy::window_moved(const Window::Id &id, const std::int32_t &x,
if (auto window = w->second.lock()) {
auto new_frame = window->frame();
new_frame.translate(x, y);
window->update_frame(new_frame);
android_api_->resize_task(window->task(), new_frame, 3);
}
}
......
......@@ -27,15 +27,7 @@ Window::Window(const std::shared_ptr<Renderer> &renderer, const Task::Id &task,
Window::~Window() {}
void Window::update_state(const WindowState::List &states) {
graphics::Rect new_frame = graphics::Rect::Invalid;
for (const auto &s : states) {
if (new_frame == graphics::Rect::Invalid)
new_frame = s.frame();
else
new_frame.merge(s.frame());
}
update_frame(new_frame);
(void)states;
}
void Window::update_frame(const graphics::Rect &frame) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册