Summary: | [patch] No way to paste primary selection in GTK Programs using x11-toolkits/gtk20 and x11/toolkits/gtk30 | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Anonymized Account <no-reply> | ||||||||||||||||||||||
Component: | Individual Port(s) | Assignee: | freebsd-gnome (Nobody) <gnome> | ||||||||||||||||||||||
Status: | Closed FIXED | ||||||||||||||||||||||||
Severity: | Affects Only Me | CC: | jbeich | ||||||||||||||||||||||
Priority: | Normal | ||||||||||||||||||||||||
Version: | Latest | ||||||||||||||||||||||||
Hardware: | Any | ||||||||||||||||||||||||
OS: | Any | ||||||||||||||||||||||||
See Also: | https://bugzilla.gnome.org/show_bug.cgi?id=643391 | ||||||||||||||||||||||||
Attachments: |
|
Description
Anonymized Account
2014-04-04 20:00:00 UTC
State Changed From-To: open->open Rescue this PR from the 'pending' category. Responsible Changed From-To: gnats-admin->gnome Created attachment 148305 [details]
x11-toolkits/gtk20
Created attachment 148306 [details]
x11-toolkits/gtk30
Made the fix use "SHIFT_INSERT_FIX" knob. Also added NLS knob. > +.if ${PORT_OPTIONS:MSHIFT_INSERT_FIX}
> +EXTRA_PATCHES= ${FILESDIR}/extra-patch-gtk_gtkentry.c \
> + ${FILESDIR}/extra-patch-gtk_gtkentry.h \
> + ${FILESDIR}/extra-patch-gtk_gtktextview.c \
> + ${FILESDIR}/extra-patch-gtk_gtktextview.h
> +.endif
> +
The files are not present in the patch. Both gtk20 and gtk30. Did you forget to |svn add| before |svn diff|?
Sorry, will fix. Created attachment 148459 [details]
x11-toolkits/gtk20
Created attachment 148460 [details]
x11-toolkits/gtk30
Patches need to be rebased after Gnome 3.14.1 landed in ports r372768. And it seems they're different from those in upstream bug. Created attachment 149715 [details]
x11-toolkits/gtk30, upstream version
The implementation from that bug + shift-insert fix from here. files/patch-gnome-bug643391 is applied unconditionally as it only provides "paste-selection" for custom keybindings. Notable difference is being able to bind GDK_SELECTION_SECONDARY.
Created attachment 149716 [details]
gtk30 log, upstream version
Created attachment 149723 [details]
x11-toolkits/gtk20, upstream version
Created attachment 149724 [details]
gtk20 log, upstream version
With www/firefox both versions work fine in open/save dialog and fail elsewhere: (firefox:61133): Gtk-CRITICAL **: IA__gtk_widget_get_clipboard: assertion 'gtk_widget_has_screen (widget)' failed (firefox:61133): Gtk-CRITICAL **: IA__gtk_clipboard_request_text: assertion 'clipboard != NULL' failed or (GTK3 option) (firefox:61465): Gtk-CRITICAL **: gtk_widget_get_clipboard: assertion 'gtk_widget_has_screen (widget)' failed (firefox:61465): Gtk-CRITICAL **: gtk_clipboard_request_text: assertion 'clipboard != NULL' failed Been working fine here, so far. Created attachment 151732 [details]
x11-toolkits/gtk30 3.14.7
Positions to patch have changed again
The problem with this patch is, in some programs for whatever reason it still does not work, likely because they use own key bindings. And GNOME folks, as well as some authors of GTK-based programs are never going to admit there is a problem with that. In case someone stumbles upon this, there are two workarounds that are better than the solution: they work across all GUI toolkits, as not only GTK seems to suffer from the same problem. A) Sync primary selection and clipboard manually. Assign window manager key bindings for x11/xsel-conrad (x11/xsel might work, too): $ xsel -p | xsel -b -i # Copy from primary to clipboard $ xsel -b | xsel -p -i # Copy from clipboard to primary B) Sync automatically. This seems the best way. Has been around since at least 2009, but for some reason is rarely if ever mentioned: https://bbs.archlinux.org/viewtopic.php?id=22682 . Run two instances of deskutils/autocutsel: $ autocutsel -selection CLIPBOARD -fork $ autocutsel -selection PRIMARY -fork |