Console warning when propagating key events
- From: Eric Gregory <eric yorba org>
- To: gtk-list gnome org
- Subject: Console warning when propagating key events
- Date: Tue, 7 May 2013 14:19:46 -0700
We got a patch recently that propagates key events to a GtkEntry that would otherwise be captured by an accelerator. The patch adds the following:
key_press_event.connect(on_key_press_event);
// SNIP...
private bool on_key_press_event(Gdk.EventKey event) {
return propagate_key_event(event);
}
Now, this method works fine -- it does exactly what it was intended to do. If you have the GtkEntry selected and hit "a", the letter "a" appears in the GtkEntry and the action bound to the "a" key is not fired.
The problem is, before you've used any accelerators, hitting almost any key will result in the following (harmless) console warning:
Gdk-WARNING **: Event with type 8 not holding a GdkDevice. It is most likely synthesized outside Gdk/GTK+
A stack trace seems to indicate this is coming from within gdk_event_get_device().
So this brings up a few questions:
* Why is this warning being issued?
* Why does the warning disappear after an action is fired?
* Is there something we should be doing to avoid this, i.e. is the above method for propagating key events somehow invalid?
- Eric
P.S. For future reference, the ticket for this on our end is here:
http://redmine.yorba.org/issues/6913
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]