GNOME Bugzilla – Bug 424
key event problem in menus
Last modified: 2004-12-22 21:47:04 UTC
Package: gtk+ Version: 1.1.16 OS: Linux/Debian 2.0 glibc 2.0.7 (gtk from Potato) X: 3.3.3.1 I'm working on a gtk+ port of an editor (as a project to learn gtk+), an found a strange problem. I'm using the ItemFactory to create the menus and a DrawingArea for the editor window. Now the problem: when the menubar is active and I press the left or right cursor key (and don't release it - > autorepeat), the submenus starting the move as they should. But in the mean time the cursor in the editor is moving too (ie receives keypress events). When I press left or right and wait for the next submenu to appear then pressing the key again and again, no keypress event reaches the editor window. The same problem can be seen in testgtk/itemfactory (or menu): the window close button receives the keypress events if you change the submenus quickly. Any idea? Laszlo ------- Bug moved to this database by debbugs-export@bugzilla.gnome.org 2001-01-27 14:46 ------- This bug was previously known as bug 424 at http://bugs.gnome.org/ http://bugs.gnome.org/show_bug.cgi?id=424 Originally filed under the gtk+ product and general component. Unknown version 1.1.x in product gtk+. Setting version to the default, "unspecified". The original reporter (laszlo.molnar@eth.ericsson.se) of this bug does not have an account here. Reassigning to the exporter, debbugs-export@bugzilla.gnome.org. Reassigning to the default owner of the component, gtk-bugs@gtk.org.
This is pretty easily reproduced, and not at all easily fixed.
I've applied a patch to the stable branch of CVS: Fri Feb 2 13:20:12 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkmain.c (gtk_propagate_event): When a grab widget is in effect, give the grab widget a first crack at KEY_PRESS/RELEASE events. (#424) That fixes this problem. Assuming that no problems turn up with this patch during testing, it will be in GTK+-1.2.9.
Do me a favor and make sure that you test mozilla with this patch. It's particularly sensitive to key event changes like this. Context menus, regular menus, autocompletion, etc.
*** Bug 30385 has been marked as a duplicate of this bug. ***