summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiulio Camuffo <giulio.camuffo@jollamobile.com>2014-02-21 10:58:56 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-11 15:35:53 +0100
commit7ab464dca0f303460597d4ec3f03a0ecae352be5 (patch)
tree7524259ba79d326e88bc89f96174ec21bf938aad
parent043a2893c41bbe0daa8953e9e30dd6957f216d95 (diff)
downloadqtwayland-7ab464dca0f303460597d4ec3f03a0ecae352be5.tar.gz
Flush the clients connection after sending the frame callbacks
We want to make sure the events reach the clients asap. Change-Id: I0783c6be4f4412fd5f3665faec1e57d141291ce7 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
-rw-r--r--examples/qml-compositor/main.cpp2
-rw-r--r--examples/server-buffer/compositor/main.cpp2
-rw-r--r--src/compositor/wayland_wrapper/qwlcompositor.cpp1
3 files changed, 3 insertions, 2 deletions
diff --git a/examples/qml-compositor/main.cpp b/examples/qml-compositor/main.cpp
index c33eb7e6..93b23c0e 100644
--- a/examples/qml-compositor/main.cpp
+++ b/examples/qml-compositor/main.cpp
@@ -68,7 +68,7 @@ public:
winId();
connect(this, SIGNAL(beforeSynchronizing()), this, SLOT(startFrame()), Qt::DirectConnection);
- connect(this, SIGNAL(afterRendering()), this, SLOT(sendCallbacks()), Qt::DirectConnection);
+ connect(this, SIGNAL(afterRendering()), this, SLOT(sendCallbacks()));
}
QWaylandSurface *fullscreenSurface() const
diff --git a/examples/server-buffer/compositor/main.cpp b/examples/server-buffer/compositor/main.cpp
index 1aa29029..ff375a8c 100644
--- a/examples/server-buffer/compositor/main.cpp
+++ b/examples/server-buffer/compositor/main.cpp
@@ -84,7 +84,7 @@ public:
grabWindow();
connect(this, SIGNAL(beforeSynchronizing()), this, SLOT(startFrame()), Qt::DirectConnection);
- connect(this, SIGNAL(afterRendering()), this, SLOT(sendCallbacks()), Qt::DirectConnection);
+ connect(this, SIGNAL(afterRendering()), this, SLOT(sendCallbacks()));
connect(this, SIGNAL(sceneGraphInitialized()), this, SLOT(initiateServerBuffer()),Qt::DirectConnection);
connect(this, SIGNAL(serverBuffersCreated()), this, SLOT(createServerBufferItems()));
diff --git a/src/compositor/wayland_wrapper/qwlcompositor.cpp b/src/compositor/wayland_wrapper/qwlcompositor.cpp
index 672924ed..34f1ab5c 100644
--- a/src/compositor/wayland_wrapper/qwlcompositor.cpp
+++ b/src/compositor/wayland_wrapper/qwlcompositor.cpp
@@ -228,6 +228,7 @@ void Compositor::sendFrameCallbacks(QList<QWaylandSurface *> visibleSurfaces)
foreach (QWaylandSurface *surface, visibleSurfaces) {
surface->handle()->sendFrameCallback();
}
+ wl_display_flush_clients(m_display->handle());
}
void Compositor::createSurface(struct wl_client *client, uint32_t id)