Browse Source

Don't clear X11 clipboard if we still have the ownership (#20137)

release/11.3.10
Julien Lebosquain 10 months ago
parent
commit
c8f114a59a
No known key found for this signature in database GPG Key ID: 1833CAD10ACC46FD
  1. 5
      src/Avalonia.X11/Clipboard/X11Clipboard.cs

5
src/Avalonia.X11/Clipboard/X11Clipboard.cs

@ -50,7 +50,10 @@ namespace Avalonia.X11.Clipboard
{
if (ev.type == XEventName.SelectionClear)
{
_storedDataTransfer = null;
// We night have already regained the clipboard ownership by the time a SelectionClear message arrives.
if (GetOwner() != _handle)
_storedDataTransfer = null;
_storeAtomTcs?.TrySetResult(true);
return;
}

Loading…
Cancel
Save