https://bugs.kde.org/show_bug.cgi?id=515465

Nicolas Fella <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/fram |https://invent.kde.org/fram
                   |eworks/kguiaddons/-/commit/ |eworks/kguiaddons/-/commit/
                   |4a9d7ea381cd437422de9cf69d5 |d9666cf72e84d81869204850dbd
                   |7eb8b88579b87               |915644e49a379

--- Comment #21 from Nicolas Fella <[email protected]> ---
Git commit d9666cf72e84d81869204850dbd915644e49a379 by Nicolas Fella, on behalf
of David Edmundson.
Committed on 02/03/2026 at 15:24.
Pushed by nicolasfella into branch 'Frameworks/6.23'.

clipboard: Hold mutex before dispatching any wayland events

The current code correctly guarded the case of Wayland events
triggering changes whilst the application was using mimedata.

It didn't safely cover the case of what if wayland is using the thread whilst
the application changes the available mimedata.

Putting the mutex in DataSource::send isn't safe as we also need to synchronise
dispatching the event to the wl_proxy whilst the main thread deletes things.

The code was simplified to hold a mutex before any wayland event on this queue
is dispatched. Unfortunately this simplification meant we couldn't use the
helper wayland
function to poll and dispatch events.

As we need to control the mutex from more places this is moved to a global.
(cherry picked from commit 4a9d7ea381cd437422de9cf69d57eb8b88579b87)

M  +39   -22   src/systemclipboard/waylandclipboard.cpp

https://invent.kde.org/frameworks/kguiaddons/-/commit/d9666cf72e84d81869204850dbd915644e49a379

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to