From 2a82da8787a177691641b17337c317ef3c699b9e Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Tue, 21 Nov 2017 10:13:43 +0100 Subject: [PATCH 1/3] Revert "Ref count buffer usage" When a buffer is committed multiple times, not all compositors (i.e. Weston) send a matching number of release events. This caused clients to freeze on some occasions on those compositors because they were waiting for a release event that never came. This reverts commit 1fbffb9dfb011c3b7c7aaa41b7be3a8167ce0c8a. Backport from 5.10.0 to 5.9.4 Task-number: QTBUG-64631 Reviewed-by: David Edmundson Reviewed-by: Paul Olav Tvete (cherry picked from commit f1b07ea1ee9e839a5ca38c4c330511ab6cd0b56c) Change-Id: I2acf5574a1b792d3bbf928fb0bc328aa8ee8ffe0 Reviewed-by: Johan Helsing --- src/plugins/platforms/wayland/qwaylandbuffer.cpp | 2 +- src/plugins/platforms/wayland/qwaylandbuffer_p.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylandbuffer.cpp b/src/plugins/platforms/wayland/qwaylandbuffer.cpp index 076a0d57d74..a0fcc532f5b 100644 --- a/src/plugins/platforms/wayland/qwaylandbuffer.cpp +++ b/src/plugins/platforms/wayland/qwaylandbuffer.cpp @@ -66,7 +66,7 @@ void QWaylandBuffer::init(wl_buffer *buf) void QWaylandBuffer::release(void *data, wl_buffer *) { - static_cast(data)->mBusy--; + static_cast(data)->mBusy = false; } const wl_buffer_listener QWaylandBuffer::listener = { diff --git a/src/plugins/platforms/wayland/qwaylandbuffer_p.h b/src/plugins/platforms/wayland/qwaylandbuffer_p.h index b3513d1515e..9e8cba2e490 100644 --- a/src/plugins/platforms/wayland/qwaylandbuffer_p.h +++ b/src/plugins/platforms/wayland/qwaylandbuffer_p.h @@ -73,14 +73,14 @@ public: virtual QSize size() const = 0; virtual int scale() const { return 1; } - void setBusy() { mBusy++; } - bool busy() const { return mBusy > 0; } + void setBusy() { mBusy = true; } + bool busy() const { return mBusy; } protected: struct wl_buffer *mBuffer; private: - int mBusy; + bool mBusy; static void release(void *data, wl_buffer *); static const wl_buffer_listener listener; From f94c0f2cb6cb1ffa7a03e93228729802bfb5af93 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Fri, 5 Jan 2018 12:44:30 +0100 Subject: [PATCH 2/3] Fix protocol error when destroying xdg surfaces (v6) Destroy role object for toplevels when destroying the xdg surface. Task-number: QTBUG-65568 Change-Id: Ibe027c3eef8160f9fd2cfb05971c92ceb155f95b Reviewed-by: David Edmundson Reviewed-by: Pier Luigi Fiorini --- src/plugins/platforms/wayland/qwaylandxdgshellv6.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/platforms/wayland/qwaylandxdgshellv6.cpp b/src/plugins/platforms/wayland/qwaylandxdgshellv6.cpp index cd81778c79c..7473174d1bf 100644 --- a/src/plugins/platforms/wayland/qwaylandxdgshellv6.cpp +++ b/src/plugins/platforms/wayland/qwaylandxdgshellv6.cpp @@ -125,6 +125,8 @@ QWaylandXdgSurfaceV6::QWaylandXdgSurfaceV6(QWaylandXdgShellV6 *shell, ::zxdg_sur QWaylandXdgSurfaceV6::~QWaylandXdgSurfaceV6() { + if (m_toplevel) + zxdg_toplevel_v6_destroy(m_toplevel->object()); if (m_popup) zxdg_popup_v6_destroy(m_popup->object()); destroy(); From 6ec8b1093a3d2f6d62846091abe35098c55eec10 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Tue, 16 Jan 2018 12:02:30 +0100 Subject: [PATCH 3/3] Fix static builds with libwayland-egl There was a naming conflict between the client buffer integration, wayland-egl, and the system library libwayland-egl.so Rename the plugin binary to qt-plugin-wayland-egl to avoid the issue. Task-number: QTBUG-65652 Change-Id: Ib074c25e269a5e11b087fb4c3ddb15fef7d4a7ee Reviewed-by: Paul Olav Tvete --- .../plugins/hardwareintegration/wayland-egl/wayland-egl.pro | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/wayland-egl.pro b/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/wayland-egl.pro index d85c5efaaa1..409cd37d7c7 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/wayland-egl.pro +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/wayland-egl.pro @@ -7,6 +7,8 @@ OTHER_FILES += \ SOURCES += main.cpp +TARGET = qt-plugin-wayland-egl + PLUGIN_TYPE = wayland-graphics-integration-client PLUGIN_CLASS_NAME = QWaylandEglClientBufferPlugin load(qt_plugin)