~gerboland/qtubuntu/upstream-closer

« back to all changes in this revision

Viewing changes to src/ubuntumirclient/window.h

  • Committer: Bileto Bot
  • Author(s): Gerry Boland
  • Date: 2016-10-24 11:32:31 UTC
  • mfrom: (280.6.15 enable-debug-mode)
  • Revision ID: ci-train-bot@canonical.com-20161024113231-ay0ahzs9jsytg5oq
Use mir-client-debug to map window coordinates to screen coordinates

If client detects testability framework was enabled, try to load the mir-client-debug library and use it to implement UbuntuWindow::mapToGlobal. This should enable Autopilot to correctly interact with the application. (LP: #1346633)

Approved by: Daniel d'Andrada, Unity8 CI Bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
#include <EGL/egl.h>
29
29
 
 
30
class UbuntuDebugExtension;
30
31
class UbuntuNativeInterface;
31
32
class UbuntuInput;
32
33
class UbuntuScreen;
39
40
    Q_OBJECT
40
41
public:
41
42
    UbuntuWindow(QWindow *w, UbuntuInput *input, UbuntuNativeInterface* native, EGLDisplay eglDisplay,
42
 
                 MirConnection *mirConnection);
 
43
                 MirConnection *mirConnection, UbuntuDebugExtension *debugExt);
43
44
    virtual ~UbuntuWindow();
44
45
 
45
46
    // QPlatformWindow methods.
52
53
    void propagateSizeHints() override;
53
54
    bool isExposed() const override;
54
55
 
 
56
    QPoint mapToGlobal(const QPoint &pos) const override;
55
57
    QSurfaceFormat format() const override;
56
58
 
57
59
    // Additional Window properties exposed by NativeInterface
79
81
    Qt::WindowFlags mWindowFlags;
80
82
    bool mWindowVisible;
81
83
    bool mWindowExposed;
 
84
    UbuntuDebugExtension *mDebugExtention;
82
85
    UbuntuNativeInterface *mNativeInterface;
83
86
    std::unique_ptr<UbuntuSurface> mSurface;
84
87
    float mScale;