<div dir="ltr"><div class="gmail_extra">Hi,<br><br></div><div class="gmail_extra">I commented on the bug, but I may as well comment here:<br><br><br></div><div class="gmail_extra"><div class="gmail_quote">On Tue, Jul 22, 2014 at 11: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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">3. Mir let the clients find their surface's screen position</blockquote></div><br><br></div><div class="gmail_extra">
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 (<a href="http://qt-project.org/doc/qt-5/qwidget.html#mapToGlobal">http://qt-project.org/doc/qt-5/qwidget.html#mapToGlobal</a>) says:<br>
<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">Translates the widget coordinate <i>pos</i> to global screen coordinates. For example, <tt>mapToGlobal(QPoint(0,0))</tt> would give the global coordinates of the top-left pixel of the widget.<br>
</blockquote></div><div class="gmail_extra"><br clear="all"><br></div><div class="gmail_extra">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.<br>
<br>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.<br>
</div><div class="gmail_extra"><br><br></div><div class="gmail_extra">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.<br>
</div><div class="gmail_extra"><br><br></div><div class="gmail_extra">Cheers,<br></div><div class="gmail_extra">-- <br><div dir="ltr"><div>Thomi Richards<br></div><a href="mailto:thomi.richards@canonical.com" target="_blank">thomi.richards@canonical.com</a><br>
</div>
</div></div>