Browse Source

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

pull/20156/head
Julien Lebosquain 10 months ago
committed by GitHub
parent
commit
9c393b306a
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  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