diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2004-01-12 01:45:22 +0000 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2004-01-12 01:45:22 +0000 |
commit | 244c93fe5767497dd45bb3d3ad22a9c72ccc2d5b (patch) | |
tree | d383c54483d68845ca5ce18f92491bc097d78a94 /lwlib/lwlib-Xlw.c | |
parent | 0fbe422d1c18358c87d481898d25bad7e2bd02da (diff) | |
download | emacs-244c93fe5767497dd45bb3d3ad22a9c72ccc2d5b.tar.gz |
Changes for lucid popup menus (keyboard traversal enabled) and dialogs
(Xaw and Xm pop down on ESC).
Diffstat (limited to 'lwlib/lwlib-Xlw.c')
-rw-r--r-- | lwlib/lwlib-Xlw.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/lwlib/lwlib-Xlw.c b/lwlib/lwlib-Xlw.c index d0800e0ca0e..248e4e8be74 100644 --- a/lwlib/lwlib-Xlw.c +++ b/lwlib/lwlib-Xlw.c @@ -180,6 +180,7 @@ xlw_create_popup_menu (instance) XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance); XtAddCallback (widget, XtNhighlightCallback, highlight_hook, (XtPointer)instance); + return popup_shell; } @@ -251,7 +252,6 @@ xlw_popup_menu (widget, event) Widget widget; XEvent *event; { - XButtonPressedEvent dummy; XlwMenuWidget mw; if (!XtIsShell (widget)) @@ -260,21 +260,24 @@ xlw_popup_menu (widget, event) mw = (XlwMenuWidget)((CompositeWidget)widget)->composite.children [0]; if (event) - pop_up_menu (mw, (XButtonPressedEvent*) event); + XtCallActionProc ((Widget) mw, "start", event, NULL, 0); else { - dummy.type = ButtonPress; - dummy.serial = 0; - dummy.send_event = 0; - dummy.display = XtDisplay (widget); - dummy.window = XtWindow (XtParent (widget)); - dummy.time = CurrentTime; - dummy.button = 0; - XQueryPointer (dummy.display, dummy.window, &dummy.root, - &dummy.subwindow, &dummy.x_root, &dummy.y_root, - &dummy.x, &dummy.y, &dummy.state); - - pop_up_menu (mw, &dummy); + XEvent dummy; + XButtonPressedEvent *bd = &dummy.xbutton; + + bd->type = ButtonPress; + bd->serial = 0; + bd->send_event = 0; + bd->display = XtDisplay (widget); + bd->window = XtWindow (XtParent (widget)); + bd->time = CurrentTime; + bd->button = 0; + XQueryPointer (bd->display, bd->window, &bd->root, + &bd->subwindow, &bd->x_root, &bd->y_root, + &bd->x, &bd->y, &bd->state); + + XtCallActionProc ((Widget) mw, "start", &dummy, NULL, 0); } } |