one copy causes multiple gtk_clipboard_set_with_data

From: Tomeu Vizoso <tomeu_at_tomeuvizoso.net>
Date: Fri Jan 12 2007 - 14:51:03 CET

Hi,

the clipboard manager in sugar has encountered a problem when copying
text from abi: http://dev.laptop.org/ticket/716

Reading some code found that at every copy several addData would be
called and each of them would call gtk_clipboard_set_with_data.

As a result of it, several taking of ownership happen per copy, so for a
clipboard manager listening to owner-change it would appear as several
copies.

The patch attached mimics what is done in win32, when next to the
addData calls a closeClipboard is issued, for effectively putting the
data in the clipboard.

Have done some testing and it works. Could someone look at the patch and
comment on it?

Thanks,

Tomeu

Received on Fri Jan 12 14:51:57 2007

This archive was generated by hypermail 2.1.8 : Fri Jan 12 2007 - 14:51:58 CET