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.
This commit is contained in:
parent
c4664603fd
commit
3d051a4056
2 changed files with 2 additions and 9 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue