Rinat <[email protected]> has asked Simon Steinbeiss <[email protected]> for
review:
Bug 11130: History must be cleared twice to be fully cleared
https://bugzilla.xfce.org/show_bug.cgi?id=11130

Attachment 6894: Avoid calling gtk_clipboard_clear()
https://bugzilla.xfce.org/attachment.cgi?id=6894&action=edit



--- Comment #10 from Rinat <[email protected]> ---
Created attachment 6894
  --> https://bugzilla.xfce.org/attachment.cgi?id=6894&action=edit
Avoid calling gtk_clipboard_clear()

I think there is no sense in calling gtk_clipboard_clear() after
gtk_clipboard_set_text(). Latter makes a copy of data, and sets
required reply callback, so other applications will get an empty
string which is fine. Calling _clear() makes GTK+ to call
XSetSelectionOwner() with owner=None, which may cause change of
selection owner with "strikeback" effect.

Also passing length of 1 looks wrong. String is empty, so its
length should be 0. Luckily, GTK+ uses g_strndup() inside, which
makes it an empty string rather than a string of one '\0'.

This patch fixes issue for me. I could reproduce it before the
patch, and can't reproduce after.
_______________________________________________
Xfce-bugs mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce-bugs

Reply via email to