Clients reading their surface position on screen

Thomi Richards thomi.richards at
Tue Jul 22 00:04:54 UTC 2014


I commented on the bug, but I may as well comment here:

On Tue, Jul 22, 2014 at 11:42 AM, Gerry Boland <gerry.boland at>

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

I'm pushing for this solution, for a variety of reasons. The main one is
that the QWidget::mapToGlobal call is what we use to determine global
screen coordinates for each widget. The documentation ( says:

Translates the widget coordinate *pos* to global screen coordinates. For
> example, mapToGlobal(QPoint(0,0)) would give the global coordinates of
> the top-left pixel of the widget.

There's nothing in there that says "this may not be supported by the
current platform". To my mind, there's a contract here between the
application and Qt, which, if we want to support Qt on mir, has to remain
valid. Autopilot uses this call on X11 platforms, it should be able to use
exactly the same call on mir. Autopilot-qt makes no X11-specific calls, we
*just* use the Qt API.

While autopilot (or more accurately, autopilot-qt) is the broken component
in this case, this is a part of the public Qt API. If it doesn't work on
mir, someone else will have exactly the same problem down the road.

I understand not wanting to expose more information to mir clients than is
strictly necessary. In this case, however, I think the pragmatic approach
is to look at solution #3.

Thomi Richards
thomi.richards at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Mir-devel mailing list