GNOME Bugzilla – Bug 108927
gtksocket doesn't forward keypresses correctly
Last modified: 2004-12-22 21:47:04 UTC
Description: I'm embedding Vim in Nautilus, and I've been searching for a method for Vim to override Nautilus' accelerators. Nautilus uses Escape, CTRL-R, CTRL-N, etc, but Vim needs to receive these keypresses. So I set up an accelerator group on the GtkPlug for these keys. Unfortunately, now both Vim _and_ Nautilus receive the keystrokes. Problem: In gtksocket.c, the activate_key function forwards a keypress event to the corresponding GtkPlug. This function doesn't currently return a value to say that the event was handled, which means that subsequent accelerator groups may also receive the event. Solution: Change activate_key to return TRUE. (patch attached).
Created attachment 15160 [details] [review] Fix activate_key to return TRUE.
Thanks - the fixes needed were actually a bit more extensive. Mon Apr 21 19:02:16 2003 Owen Taylor <otaylor@redhat.com> * gtk/gtksocket.c (activate_key): Fix prototype for activate_key. (#108927, Jason D. Hildebrand)
Created attachment 15909 [details] [review] Patch applied