Mercurial > emacs
diff lwlib/lwlib-Xaw.c @ 89909:68c22ea6027c
Sync to HEAD
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 16 Apr 2004 12:51:06 +0000 |
parents | 375f2633d815 |
children | 95879cc1ed20 |
line wrap: on
line diff
--- a/lwlib/lwlib-Xaw.c Thu Apr 15 01:08:34 2004 +0000 +++ b/lwlib/lwlib-Xaw.c Fri Apr 16 12:51:06 2004 +0000 @@ -277,6 +277,9 @@ static char overrideTrans[] = "<Message>WM_PROTOCOLS: lwlib_delete_dialog()"; +/* Dialogs pop down on any key press */ +static char dialogOverride[] = + "<KeyPress>: lwlib_delete_dialog()"; static void wm_delete_window(); static XtActionsRec xaw_actions [] = { {"lwlib_delete_dialog", wm_delete_window} @@ -333,6 +336,8 @@ ac = 0; dialog = XtCreateManagedWidget (name, dialogWidgetClass, shell, av, ac); + override = XtParseTranslationTable (dialogOverride); + XtOverrideTranslations (dialog, override); bc = 0; button = 0; @@ -511,8 +516,8 @@ } static void -wm_delete_window (shell, closure, call_data) - Widget shell; +wm_delete_window (w, closure, call_data) + Widget w; XtPointer closure; XtPointer call_data; { @@ -520,7 +525,13 @@ Cardinal nkids; int i; Widget *kids = 0; - Widget widget; + Widget widget, shell; + + if (XtIsSubclass (w, dialogWidgetClass)) + shell = XtParent (w); + else + shell = w; + if (! XtIsSubclass (shell, shellWidgetClass)) abort (); XtVaGetValues (shell, XtNnumChildren, &nkids, NULL); @@ -670,3 +681,6 @@ {"main", xaw_create_main}, {NULL, NULL} }; + +/* arch-tag: fbbd3589-ae1c-41a0-9142-f628cfee6564 + (do not change this comment) */