! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-settings-helper triggers GTK+ bug 333320
Status:
RESOLVED: FIXED
Product:
Xfce4-settings
Component:
Clipboard Manager

Comments

Description brian-schott 2010-11-13 10:08:21 CET
See the GNOME bugzilla for a description of the bug:
https://bugzilla.gnome.org/show_bug.cgi?id=333320

I don't experience this bug after I type "killall xfce4-settings-helper"
Comment 1 Jérôme Guelfucci editbugs 2010-11-13 10:22:53 CET
Reading the GTK bug report, it seems that this happens because we steal the PRIMARY selection (I can't reproduce here). Should we drop that and only watch CLIPBOARD?

Nick, Jannis, what do you think?
Comment 2 Mike Massonnet editbugs 2010-11-13 13:06:35 CET
Good catch.

On another side, Owen Taylor commented the clipboard manager using gtkclipboard:
https://bugzilla.gnome.org/show_bug.cgi?id=496991#c15
https://bugzilla.gnome.org/show_bug.cgi?id=496991#c17
Comment 3 Nick Schermer editbugs 2011-01-02 22:32:25 CET
Mike any ideas how to fix this?
Comment 4 Mike Massonnet editbugs 2011-01-04 20:51:30 CET
Looking at it tonight, will let you know, but indeed, it has to do with primary_clipboard_owner_change() code.
Comment 5 Mike Massonnet editbugs 2011-01-05 22:01:42 CET
Diagnostic is the following.

Storing the primary clipboard is done safely only when making a text selection with the keyboard (hold down shift key) or the mouse (hold down the button).

When the text selection is done dynamically, e.g. by the GtkEntryCompletion widget, the primary clipboard is under continual change.

Anytime the clipboard content is retrieved (gtk_clipboard_wait_for_text()) for being stored in a cached value it renders freezes to furthermore access the clipboard.

I'll be looking for a fix in order to prevent such "freezes". Tomorrow morning again... it's too late now and I'm missing the movie :)

Cheers
Mike
Comment 6 Mike Massonnet editbugs 2011-01-09 22:08:00 CET
Created attachment 3332 
0001-Dispatch-primary-clipboard-restoration-bug-6819.patch

As in the commented commit:

The GtkEntryCompletion widget is actually continuously removing ownership over the clipboard, quickly after that setting it back.

The code assumed that when the ownership was removed, it could safely restore the cached value. Wrong. This causes the widget to "erase" the current selection and typing continues at the end of the string (as seen in the mentioned bug on comment 1).

I have a local patch that does the restoring through a dispatched GSource, which enables to remove that GSource if ownership is set right back again.

It works most sincerely fine for me now.
Comment 7 Nick Schermer editbugs 2011-01-10 00:00:18 CET
Should be Gsource not be removed when the manager quits? apart from that, feel tree to commit this in master.
Comment 8 Mike Massonnet editbugs 2011-01-12 20:30:23 CET
(In reply to comment #7)
> Should be Gsource not be removed when the manager quits? apart from that, feel
> tree to commit this in master.

remote: >> check commit permissions
remote: Commit access to repository 'xfce/xfce4-settings' denied for user 'mmassonnet'.
remote: Contact xfce-repo-admin@xfce.org for help.

Regarding the GSource, it is not necessary, the callbacks always return FALSE, plus the only time the GSource is destroyed is at the end of the process during the gtk_main_quit() sequence.
Comment 9 Jérôme Guelfucci editbugs 2011-01-13 00:12:16 CET
Pushed to git master, thanks a lot Mike!
Comment 10 Jérôme Guelfucci editbugs 2011-01-13 00:15:21 CET
*** Bug 6804 has been marked as a duplicate of this bug. ***
Comment 11 Mike Massonnet editbugs 2012-01-30 11:50:42 CET
*** Bug 6804 has been marked as a duplicate of this bug. ***
Comment 12 Yves-Alexis Perez editbugs 2012-01-30 17:19:34 CET
*** Bug 8411 has been marked as a duplicate of this bug. ***
Comment 13 Mike Massonnet editbugs 2012-04-13 09:37:47 CEST
*** Bug 3078 has been marked as a duplicate of this bug. ***

Bug #6819

Reported by:
brian-schott
Reported on: 2010-11-13
Last modified on: 2012-04-13
Duplicates (3):
  • 3078 Clipman and (rdesktop or synergy) copy/paste problems
  • 6804 auto complete dose not allow typing full name
  • 8411 issues with gnucash autocompletion

People

Assignee:
Mike Massonnet
CC List:
5 users

Version

Attachments

Additional information