mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-21 23:53:24 +01:00
Drop other selection on ownership change
Otherwise we might end up owners of something we cannot deliver data on, which can hang applications.
This commit is contained in:
parent
189f503b98
commit
da83ecf86a
@ -512,6 +512,13 @@ static void vncSelectionCallback(CallbackListPtr *callbacks,
|
||||
LOG_DEBUG("Selection owner change for %s",
|
||||
NameForAtom(info->selection->selection));
|
||||
|
||||
/*
|
||||
* If we're the previous owner of this selection, then we're also the
|
||||
* owner of _the other_ selection. Make sure we drop all ownerships so
|
||||
* we either own both selections or nonw.
|
||||
*/
|
||||
DeleteWindowFromAnySelections(pWindow);
|
||||
|
||||
if ((info->selection->selection != xaPRIMARY) &&
|
||||
(info->selection->selection != xaCLIPBOARD))
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user