From 975b0d12b2fbe511e473b8a47ad18514443f9746 Mon Sep 17 00:00:00 2001 From: Simon Fels Date: Wed, 18 Jan 2017 07:48:12 +0100 Subject: [PATCH] LayerComposer: correct formatting of rect calculation --- src/anbox/graphics/layer_composer.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/anbox/graphics/layer_composer.cpp b/src/anbox/graphics/layer_composer.cpp index cdb5dfdb..5c2e4792 100644 --- a/src/anbox/graphics/layer_composer.cpp +++ b/src/anbox/graphics/layer_composer.cpp @@ -73,13 +73,10 @@ void LayerComposer::submit_layers(const RenderableList &renderables) { // need to recalculate all layer coordinates into relatives ones to the // window they are drawn into. auto rect = Rect{ - r.screen_position().left() - new_window_frame.left() + - r.crop().left(), + r.screen_position().left() - new_window_frame.left() + r.crop().left(), r.screen_position().top() - new_window_frame.top() + r.crop().top(), - r.screen_position().right() - new_window_frame.left() + - r.crop().left(), - r.screen_position().bottom() - new_window_frame.top() + - r.crop().top()}; + r.screen_position().right() - new_window_frame.left() + r.crop().left(), + r.screen_position().bottom() - new_window_frame.top() + r.crop().top()}; auto new_renderable = r; new_renderable.set_screen_position(rect); -- GitLab