xfreerdp: fix cliprdr SelectionNotify enless loop

xf_cliprdr_process_selection_notify calls xf_cliprdr_send_client_format_list
if the SelectionNotify event property was None.
xf_cliprdr_send_client_format_list called XConvertSelection even if there
was no clipboard owner. In that case the XServer generates a SelectionNotify
event to the requestor (us) with property None and so on ...

The most obvious fix is to ensure that XConvertSelection is not called if
the owner is None which is done in this commit.
This commit is contained in:
Norbert Federa
2014-12-04 00:19:23 +01:00
parent 7b55c3a48e
commit c82d8c9c6b

View File

@@ -770,7 +770,7 @@ int xf_cliprdr_send_client_format_list(xfClipboard* clipboard)
free(formats);
if (clipboard->owner != xfc->drawable)
if (clipboard->owner && clipboard->owner != xfc->drawable)
{
/* Request the owner for TARGETS, and wait for SelectionNotify event */
XConvertSelection(xfc->display, clipboard->clipboard_atom,