summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.h
diff options
context:
space:
mode:
authorMartin Gräßlin <mgraesslin@kde.org>2014-05-20 13:01:50 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-27 19:31:49 +0200
commit8746a6a3e2a21f952badd6301565783f07f61c03 (patch)
tree017249ef1bf4c288b88f15e6c0269d21c4a23078 /src/plugins/platforms/xcb/qxcbconnection.h
parentd153e4628e7643cf02b795f68f739c4bced15389 (diff)
Improve the implementation of the _NET_WM_SYNC_REQUEST protocol
This change improves the synced resizes of xcb windows and adds support for synced resizes of glx windows. The QXcbWindow keeps a better track on whether the window manager expects a sync and can be in one of three states: * no sync required * sync required, but configure notify event not yet received * sync required and configured By tracking this in the QXcbWindow itself the backing store can make use of this information and doesn't need an own heuristic to decide whether a sync is needed. Also this allows to add support for synced resizes of windows with an OpenGLSurface. This is accomplished by checking the sync state after swapping buffers. As the OpenGL context may be bound to a background thread the sync is done using a QueuedConnection to ensure that the sync happens in the thread which created the xcb window. So far this is only added for GLX. This significantly improves the resize experience of QQuickWindow and also the initial mapping with a composited window manager in case the compositor uses the sync protocol to determine whether the window is ready to get painted on screen. Change-Id: Ied0261873043d785dec652d2821fc3638292fa36 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index 6e511356c4..f96541318c 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -464,6 +464,9 @@ public:
void handleEnterEvent(const xcb_enter_notify_event_t *);
#endif
+public slots:
+ void syncWindow(QXcbWindow *window);
+
private slots:
void processXcbEvents();