After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 108927 - gtksocket doesn't forward keypresses correctly
gtksocket doesn't forward keypresses correctly
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.2.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2003-03-21 23:32 UTC by Jason D. Hildebrand
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.1/2.2


Attachments
Fix activate_key to return TRUE. (508 bytes, patch)
2003-03-21 23:33 UTC, Jason D. Hildebrand
none Details | Review
Patch applied (1.89 KB, patch)
2003-04-22 18:42 UTC, Owen Taylor
none Details | Review

Description Jason D. Hildebrand 2003-03-21 23:32:18 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).
Comment 1 Jason D. Hildebrand 2003-03-21 23:33:12 UTC
Created attachment 15160 [details] [review]
Fix activate_key to return TRUE.
Comment 2 Owen Taylor 2003-04-22 18:41:51 UTC
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)
Comment 3 Owen Taylor 2003-04-22 18:42:15 UTC
Created attachment 15909 [details] [review]
Patch applied