Flush the display queue after calling eglSwapBuffers().

If we are on a rendering thread we cannot rely on
the main thread to call wl_display_flush(). It may indeed be stuck on
a wl_display_displatch*() call which blocks until there are events, or
waiting for the socket notifier to wake up, and
if the redraw and thus the eglSwapBuffers above is triggered by an application
internal event like a timer, the attach/damage/commit calls done by egl
will no be followed by a flush, resulting in the frame not reaching the
compositor until some incoming event wakes the main thread.
This could be fixed inside the egl implementation too
(http://lists.freedesktop.org/archives/mesa-dev/2013-August/043697.html)
but it's not clear if that is the right place, so this commit foreruns
that patch and fixes this serious bug in the client code.
However, some EGL implementation do indeed flush, so flush here only
if necessary.

Test case for the bug:

class Window : public QQuickWindow
{
public:
    Window() {
        setColor(Qt::white);
        m_timer.setInterval(10000);
        connect(&m_timer, &QTimer::timeout, this, &Window::slot);
        m_timer.start();
    }
    void slot() {
        setColor(Qt::red);
        update();
    }
    QTimer m_timer;
};
int main(int argc, char **argv) {
    QGuiApplication app(argc,argv);
    Window w;
    w.create();
    w.show();
    w.resize(100,100);
    return app.exec();
}

Change-Id: I3136b83245814e701ed0393dea2212c5e7d48823
QtCompositor: Expose window properties declaratively

Using QQmlPropertyMap, surface properties are made accessible to
QtQuick compositors in a declarative way. By using a QQmlPropertyMap
instead of a QVariantMap, binding and signaling are automatic.

A QML Compositor can declare a surface item and write to its properties
like so:

WaylandSurfaceItem {
    id: item

    property var roundtrip: item.surface.windowProperties.someDynamicProperty

    Binding {
        target: item.surface.windowProperties
        property: "someDynamicProperty"
        value: "someQmlValue"
    }
}

Change-Id: I783c3fd154c2512168b7cbf8c9736f833715065d
Fix compiler warnings

Change-Id: I499c50c901bff1c496b05b628f8155376b5af267
Remove compiler warning qtwaylandscanner

We don't need the interface name anymore

Change-Id: I8b1d334a549adb388da083dd8f4261755a54ff20
Fix decoration behavior when passing over with button pressed

Fix the decoration resizing or moving the window when passing over it
with the mouse button pressed, but which was not clicked over the decoration.

Change-Id: If5d1d041ae6f80a07ce83bdca92dab35f721f2eb