Browse Source
Don't clear X11 clipboard if we still have the ownership (#20137)
release/11.3.10
Julien Lebosquain
10 months ago
No known key found for this signature in database
GPG Key ID: 1833CAD10ACC46FD
1 changed files with
4 additions and
1 deletions
-
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; |
|
|
|
} |
|
|
|
|