diff options
author | Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr> | 1994-02-15 13:59:18 +0000 |
---|---|---|
committer | Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr> | 1994-02-15 13:59:18 +0000 |
commit | 3327c2351e9166f86387bd4211ed3337b54eeb62 (patch) | |
tree | b4f3ac523348eac09d6f87f555277f581c4afd8b /lwlib | |
parent | a8c8d3394ce0eab638f9e2daf5b7c58b68154bf8 (diff) | |
download | emacs-3327c2351e9166f86387bd4211ed3337b54eeb62.tar.gz |
*** empty log message ***
Diffstat (limited to 'lwlib')
-rw-r--r-- | lwlib/lwlib-Xlw.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lwlib/lwlib-Xlw.c b/lwlib/lwlib-Xlw.c index d34a012ae3c..b7268bc12d0 100644 --- a/lwlib/lwlib-Xlw.c +++ b/lwlib/lwlib-Xlw.c @@ -88,6 +88,9 @@ xlw_create_menubar (instance) instance->parent, XtNmenu, instance->info->val, 0); + + XtFree (tem); + XtAddCallback (widget, XtNopen, pre_hook, (XtPointer)instance); XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance); return widget; @@ -101,13 +104,23 @@ xlw_create_popup_menu (instance) XtCreatePopupShell (instance->info->name, overrideShellWidgetClass, instance->parent, NULL, 0); - Widget widget = + Widget widget; + + widget_value *tem = (widget_value *) XtMalloc (sizeof (widget_value)); + + /* _XtCreate is freeing the object we passed, + so make a copy that we free later. */ + bcopy (instance->info->val, tem, sizeof (widget_value)); + + widget = XtVaCreateManagedWidget ("popup", xlwMenuWidgetClass, popup_shell, XtNmenu, instance->info->val, XtNhorizontal, False, 0); + XtFree (tem); + XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance); return popup_shell; |