aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Pierresteguy1994-02-15 13:59:18 +0000
committerFred Pierresteguy1994-02-15 13:59:18 +0000
commit19240c203a1954740cc3a577f3e83f60762134cf (patch)
tree829aa47f746d88cace12c35c89e35fe163c0af2a
parent9acc68b10b087a8b19add634cdec7f66d6caf51f (diff)
downloademacs-19240c203a1954740cc3a577f3e83f60762134cf.tar.gz
emacs-19240c203a1954740cc3a577f3e83f60762134cf.zip
*** empty log message ***
-rw-r--r--lwlib/lwlib-Xlw.c15
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)
88 instance->parent, 88 instance->parent,
89 XtNmenu, instance->info->val, 89 XtNmenu, instance->info->val,
90 0); 90 0);
91
92 XtFree (tem);
93
91 XtAddCallback (widget, XtNopen, pre_hook, (XtPointer)instance); 94 XtAddCallback (widget, XtNopen, pre_hook, (XtPointer)instance);
92 XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance); 95 XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance);
93 return widget; 96 return widget;
@@ -101,13 +104,23 @@ xlw_create_popup_menu (instance)
101 XtCreatePopupShell (instance->info->name, overrideShellWidgetClass, 104 XtCreatePopupShell (instance->info->name, overrideShellWidgetClass,
102 instance->parent, NULL, 0); 105 instance->parent, NULL, 0);
103 106
104 Widget widget = 107 Widget widget;
108
109 widget_value *tem = (widget_value *) XtMalloc (sizeof (widget_value));
110
111 /* _XtCreate is freeing the object we passed,
112 so make a copy that we free later. */
113 bcopy (instance->info->val, tem, sizeof (widget_value));
114
115 widget =
105 XtVaCreateManagedWidget ("popup", xlwMenuWidgetClass, 116 XtVaCreateManagedWidget ("popup", xlwMenuWidgetClass,
106 popup_shell, 117 popup_shell,
107 XtNmenu, instance->info->val, 118 XtNmenu, instance->info->val,
108 XtNhorizontal, False, 119 XtNhorizontal, False,
109 0); 120 0);
110 121
122 XtFree (tem);
123
111 XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance); 124 XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance);
112 125
113 return popup_shell; 126 return popup_shell;