+bool wxApp::CheckForKeyDown(WXEvent* event)
+{
+ XEvent* xEvent = (XEvent*) event;
+ // VZ: this code doesn't work for me because it never finds the correct
+ // window. Also, if we go this way, we should generate KEY_UP and
+ // CHAR events as well, not only KEY_DOWN.
+#if 0
+ if (xEvent->xany.type == KeyPress)
+ {
+ Widget widget = XtWindowToWidget((Display*) wxGetDisplay(),
+ xEvent->xany.window);
+ wxWindow* win = NULL;
+
+ // Find the first wxWindow that corresponds to this event window
+ while (widget && !(win = wxGetWindowFromTable(widget)))
+ widget = XtParent(widget);
+
+ if (!widget || !win)
+ return FALSE;
+
+ wxKeyEvent keyEvent(wxEVT_KEY_DOWN);
+ wxTranslateKeyEvent(keyEvent, win, (Widget) 0, xEvent);
+
+ win->ProcessEvent( keyEvent );
+ return (keyEvent.GetSkipped() != TRUE);
+ }
+#endif // 0
+
+ return FALSE;
+}
+