summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandbuffer_p.h
diff options
context:
space:
mode:
authorDavid Redondo <qt@david-redondo.de>2023-08-02 16:43:29 +0200
committerDavid Redondo <qt@david-redondo.de>2023-08-03 10:37:58 +0200
commit39a003942ebab39a1d3b8bc64f41d0c68e92f4bf (patch)
tree8a01f5ab65de9dcca0e2e6e6f679f93c3a0e0f7c /src/client/qwaylandbuffer_p.h
parentfa2a7b256e2229d11b986007276b742d7be79e8f (diff)
client: Set queued buffer busy
From the outside it doesn't matter if the buffer was really committed or queued, it still in use. If it is not marked busy QWaylandShmBackingStore will delete when it is resized which can happen when the surface changes screens or receives a new fractional scale resulting in a use after free producing a crash or protocol error. Pick-to: 6.6 Change-Id: I8abc4edbd8990af5114aa0b36c8ecedb37a4f0f6 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
Diffstat (limited to 'src/client/qwaylandbuffer_p.h')
-rw-r--r--src/client/qwaylandbuffer_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/qwaylandbuffer_p.h b/src/client/qwaylandbuffer_p.h
index 381debc81..3798ef3eb 100644
--- a/src/client/qwaylandbuffer_p.h
+++ b/src/client/qwaylandbuffer_p.h
@@ -37,7 +37,7 @@ public:
virtual QSize size() const = 0;
virtual int scale() const { return 1; }
- void setBusy() { mBusy = true; }
+ void setBusy(bool busy) { mBusy = busy; }
bool busy() const { return mBusy; }
void setCommitted() { mCommitted = true; }