Clients reading their surface position on screen

Gerry Boland gerry.boland at
Mon Jul 21 23:42:42 UTC 2014

Hey folks,
in working on QtCompositor, I stumbled across a problem ([1]).

Autopilot needs to know the position of items in an application
(buttons, etc) in screen coordinates - not surface. It needs that as it
generates inputs via uevent, which are defined in screen coordinates.

To calculate absolute item position, it must know the position of the
application surface in screen coordinates.

However Mir does not give applications this information.

But Autopilot has this requirement, so how can we satisfy it?

Thomi and I chewed this over a bit, and the ideas we had were:

1. unity8 exposes a DBus API which
     a) allows AP to ask "what are the coordinates of the surface with
        PID x
     b) emit signals when surface position changes
   This isn't ideal, as it requires punching holes in client appArmor
confinements just for testing, and would also require a lot of work in
Autopilot to be able to listen to those DBus signals.

2. AP injects events directly into Qt/unity8
   Requires unity8 to be in a "testing" mode. Qt would need lots of work
for it to handle relative coordinates being injected.

3. Mir let the clients find their surface's screen position

But I don't think the Mir team like that final idea (I'm not a fan either).

So I'd like to open this discussion up, and see if the Mir team have
considered this issue and have suggestions/plans.


P.S. for now I've written a hack to fix AP tests with qtComp, so this is
not an urgent topic.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 538 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Mir-devel mailing list