Created attachment 6894
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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1368499

Title:
  History must be cleared twice to be fully cleared

To manage notifications about this bug go to:
https://bugs.launchpad.net/xfce4-clipman-plugin/+bug/1368499/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to