From: teodor Date: Thu, 28 Dec 2006 14:34:04 +0000 (+0000) Subject: Upps - lost commit meesage, so here: X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=commitdiff_plain;h=fc040ecab9f49543cbb531c43dc55578514a6f19;p=hclip.git Upps - lost commit meesage, so here: Make more clean work around for OpenOffice: Some applications ( OpenOffice at least ) sets owner at begining of selection instead of after finishing selection. And gtk_clipboard_wait_for_text() will fix state of X-Selection. So, GTK clipboard will see only small part of real selection. For preventing from this misbehaviour we will not try to get contents of selection - just skip it as image etc. However, it's possible to delay request of contents - but I don't know way to count correct timeout or to get finalizing event (may be yet :) ) --- diff --git a/hclip.c b/hclip.c index 7554316..55f0494 100644 --- a/hclip.c +++ b/hclip.c @@ -589,7 +589,8 @@ receiveTarget(GtkClipboard *clipboard, GdkAtom *atoms, gint n_atoms, gpointer da * request contents */ text = gtk_clipboard_wait_for_text(clipboard); - if (text) /* be carefull - world has a lot of unexpected events :) */ + /* be carefull - world has a lot of unexpected events :) */ + if (text) addMenuItem( (ClipboardDescr*)data, text ); }