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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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) |
|
|
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); |
|
|
_storeAtomTcs?.TrySetResult(true); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|