diff options
author | David Redondo <qt@david-redondo.de> | 2024-01-22 15:33:59 +0100 |
---|---|---|
committer | David Redondo <qt@david-redondo.de> | 2024-01-31 10:11:58 +0100 |
commit | fadb6d02a18aa72bc82de5fb8160e2b1ac84cf52 (patch) | |
tree | 3b1c1b61b9bff64bbea3c113f9c3f027626f82a4 /src/client/qwaylanddisplay_p.h | |
parent | 31c5f1a09d956b61bca3d2f5066588ec3858bfd2 (diff) |
client: Fix deletion of new queued shm buffers during reconnect
When reconnecting the cleanup of existing buffers is delayed in order
to preserve contents and copy them to buffers belonging to the new
connection. Due to the order of events it could happen that
a new buffer was deleted along with the old ones but still being
referenced by a window.
During reconnect all QScreens are removed and new ones added for
the wl_outputs on the new connection during the initial roundtrips.
When the first new QScreen is added all QWindows move form the placeholder
screen to it. This can cause for example QWidgets to repaint. At this point
the windows are not reinited yet, and the buffer is queued inside the window.
Only afterwards the reconnected signal was emitted which would cause
deletion of all existing buffers including the newly queued ones.
To fix this the signal is moved after the first roundtrip where all globals
are announced and new buffers can be created but no new screens have been
announced yet. The signal is renamed to be more fit for its new location.
Change-Id: I06be14d235ac342a4b420176aadad3ccf18178fe
Reviewed-by: David Edmundson <davidedmundson@kde.org>
(cherry picked from commit 8e3a9b8828c4009efd47d95da12f4da7c0a80bac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 5d5098de143bee19777660615fdcbaaf1bbc69d3)
Reviewed-by: David Redondo <qt@david-redondo.de>
Diffstat (limited to 'src/client/qwaylanddisplay_p.h')
-rw-r--r-- | src/client/qwaylanddisplay_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h index 7a64749ef..89d110785 100644 --- a/src/client/qwaylanddisplay_p.h +++ b/src/client/qwaylanddisplay_p.h @@ -204,7 +204,7 @@ public slots: void flushRequests(); signals: - void reconnected(); + void connected(); void globalAdded(const RegistryGlobal &global); void globalRemoved(const RegistryGlobal &global); |