From 0359ee6a7650f4b333a6ee6e56693f966e48056c Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Mon, 14 Dec 2020 08:57:49 +0100 Subject: [PATCH] sandbox: fix position scaling in affinity filter During position scaling use the location width/height which is the permitted dimension within the child space, instead of using the whole possible child space. (Fixup for "init: scale affinity location" Issue #1412) Thanks to the report by Peter. --- repos/os/src/lib/sandbox/child.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/os/src/lib/sandbox/child.cc b/repos/os/src/lib/sandbox/child.cc index 4c1aa9fbbd..41eb719fc6 100644 --- a/repos/os/src/lib/sandbox/child.cc +++ b/repos/os/src/lib/sandbox/child.cc @@ -665,8 +665,8 @@ Genode::Affinity Sandbox::Child::filter_session_affinity(Affinity const &session /* subordinate session affinity to child affinity subspace */ Affinity::Location location(child_session .multiply_position(session_space) - .transpose(session_location.xpos() * child_space.width(), - session_location.ypos() * child_space.height())); + .transpose(session_location.xpos() * child_location.width(), + session_location.ypos() * child_location.height())); return Affinity(space, location); }