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}
ac = 0;
dialog = XtCreateManagedWidget (name, dialogWidgetClass, shell, av, ac);
+ override = XtParseTranslationTable (dialogOverride);
+ XtOverrideTranslations (dialog, override);
bc = 0;
button = 0;
}
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;
{
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);
{"main", xaw_create_main},
{NULL, NULL}
};
+
+/* arch-tag: fbbd3589-ae1c-41a0-9142-f628cfee6564
+ (do not change this comment) */