<div dir="ltr">Hi, <br><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 22, 2014 at 1:42 AM, Gerry Boland <span dir="ltr"><<a href="mailto:gerry.boland@canonical.com" target="_blank">gerry.boland@canonical.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey folks,<br>
in working on QtCompositor, I stumbled across a problem ([1]).<br>
[...]<br>
<br>
1. unity8 exposes a DBus API which<br>
     a) allows AP to ask "what are the coordinates of the surface with<br>
        PID x<br>
     b) emit signals when surface position changes<br>
   This isn't ideal, as it requires punching holes in client appArmor<br>
confinements just for testing, and would also require a lot of work in<br>
Autopilot to be able to listen to those DBus signals.<br>
<br>
2. AP injects events directly into Qt/unity8<br>
   Requires unity8 to be in a "testing" mode. Qt would need lots of work<br>
for it to handle relative coordinates being injected.<br>
<br>
3. Mir let the clients find their surface's screen position<br>
<br>
But I don't think the Mir team like that final idea (I'm not a fan either).<br></blockquote><div><br></div><div>I would like to add a few things that might make this task more problematic.<br>But I think we can find pragmatic trade-offs and document eventual limitations.<br>
</div><div>The compositor could decide to display a surface multiple times on screen. <br>Consider live previews when switching windows or in task bars. Deform the surface<br>in a way that its placement can no longer accurately be described as a 4x4 matrix,<br>
</div><div>or even two coordinates.<br><br></div><div>So yes duflus surface_coord_to_screen_coord would solve more of that. Then the server <br>can do the calculation - and also allow the compositor to pick one placement of a surface <br>
or have multiple results..<br></div><div><br></div><div>More limitations:  <br></div><div>Since this is used for automated system tests - what happens when the given location is occluded?<br></div><div>Should we care about the delay between request and response?<br>
<br></div>Are we doing the right thing here? The system test would then rely on the positions <br>reported by applications to trigger an action within that application.<br><br></div><div class="gmail_quote">regards<br>Andreas Pokorny<br>
</div></div></div></div>