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 393326 - key-press/release-event not detected
key-press/release-event not detected
Status: RESOLVED NOTABUG
Product: criawips
Classification: Deprecated
Component: Canvas (libccc)
0.0.x
Other All
: Normal normal
: ---
Assigned To: Criawips maintainers
Criawips maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-05 23:52 UTC by Canek Peláez Valdés
Modified: 2007-05-04 16:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Small test case, shows the bug (1.60 KB, patch)
2007-01-05 23:56 UTC, Canek Peláez Valdés
none Details | Review

Description Canek Peláez Valdés 2007-01-05 23:52:19 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
Comment 1 Canek Peláez Valdés 2007-01-05 23:56:59 UTC
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).
Comment 2 Sven Herzberg 2007-04-20 14:37:16 UTC
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.
Comment 3 Sven Herzberg 2007-05-04 16:55:23 UTC
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.