aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-08-02 07:13:45 +0000
committerRichard M. Stallman1995-08-02 07:13:45 +0000
commit0c7c510c4c280b224e2abfc310225ccfff07fae9 (patch)
tree4f783427b9191e6647e79c5a25eef734f1d22699
parent5b3b31d6080cb1946ef923f65c7b98906fb5c2cb (diff)
downloademacs-0c7c510c4c280b224e2abfc310225ccfff07fae9.tar.gz
emacs-0c7c510c4c280b224e2abfc310225ccfff07fae9.zip
(xlw_popup_menu): New arg event.
-rw-r--r--lwlib/lwlib-Xlw.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/lwlib/lwlib-Xlw.c b/lwlib/lwlib-Xlw.c
index 3c0bd308699..18a65d99c27 100644
--- a/lwlib/lwlib-Xlw.c
+++ b/lwlib/lwlib-Xlw.c
@@ -185,8 +185,9 @@ xlw_pop_instance (instance, up)
185} 185}
186 186
187void 187void
188xlw_popup_menu (widget) 188xlw_popup_menu (widget, event)
189 Widget widget; 189 Widget widget;
190 XEvent *event;
190{ 191{
191 XButtonPressedEvent dummy; 192 XButtonPressedEvent dummy;
192 XlwMenuWidget mw; 193 XlwMenuWidget mw;
@@ -196,18 +197,23 @@ xlw_popup_menu (widget)
196 197
197 mw = (XlwMenuWidget)((CompositeWidget)widget)->composite.children [0]; 198 mw = (XlwMenuWidget)((CompositeWidget)widget)->composite.children [0];
198 199
199 dummy.type = ButtonPress; 200 if (event)
200 dummy.serial = 0; 201 pop_up_menu (mw, event);
201 dummy.send_event = 0; 202 else
202 dummy.display = XtDisplay (widget); 203 {
203 dummy.window = XtWindow (XtParent (widget)); 204 dummy.type = ButtonPress;
204 dummy.time = CurrentTime; 205 dummy.serial = 0;
205 dummy.button = 0; 206 dummy.send_event = 0;
206 XQueryPointer (dummy.display, dummy.window, &dummy.root, 207 dummy.display = XtDisplay (widget);
207 &dummy.subwindow, &dummy.x_root, &dummy.y_root, 208 dummy.window = XtWindow (XtParent (widget));
208 &dummy.x, &dummy.y, &dummy.state); 209 dummy.time = CurrentTime;
209 210 dummy.button = 0;
210 pop_up_menu (mw, &dummy); 211 XQueryPointer (dummy.display, dummy.window, &dummy.root,
212 &dummy.subwindow, &dummy.x_root, &dummy.y_root,
213 &dummy.x, &dummy.y, &dummy.state);
214
215 pop_up_menu (mw, &dummy);
216 }
211} 217}
212 218
213 /* Destruction of instances */ 219 /* Destruction of instances */