GNOME Bugzilla – Bug 393326
key-press/release-event not detected
Last modified: 2007-05-04 16:56:47 UTC
Please describe the problem: The signals key-press-event and key-release-event are not being detected by CCC. Steps to reproduce: 1. connect one the signals to a callback 2. press some keys while the widget is focused Actual results: The signal is not detected Expected results: The signal should be detected Does this happen every time? Yes Other information: git repository from Jan 5, 2007, 21:52
Created attachment 79495 [details] [review] Small test case, shows the bug Compile with gcc -Wall `pkg-config --cflags --libs gtk+-2.0 ccc-0.1` bug.c -o bug The program connects three signals: button-press-event (to show that the widget *is* receiving events), key-press-event and key-release-event. The button signal is emitted without problems; the key ones doesn't. Actually, the key signals are the only ones (so far) that I'm unnable to catch (and please note that the widget has the focus).
Right, I also noticed this. I'm working on a proper integration of these tests into the test framework in ccc/test . This way we'll at least notice if things are going to break again.
Actually, I was wrong and thinking about a different bug, actually your code is wrong. The sample works if you exchange gtk_widget_grab_focus() by these lines: GTK_WIDGET_SET_FLAGS(view, GTK_CAN_FOCUS); cc_item_grab_focus (item, view); But there's another issue which I'm adding to the test suite to get it fixed.