From: Gerd Moellmann Date: Mon, 17 Jan 2000 09:10:58 +0000 (+0000) Subject: (xlwMenuResources): All XtNhighlightCallback. X-Git-Tag: emacs-pretest-21.0.90~5341 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d6fd637121c9ac065161a99ddc1c8de6b50ac7fe;p=emacs.git (xlwMenuResources): All XtNhighlightCallback. (remap_menubar): Call highlight callback. --- diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index cadd02584af..11dfc2e58db 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c @@ -112,6 +112,8 @@ xlwMenuResources[] = offset(menu.open), XtRCallback, (XtPointer)NULL}, {XtNselect, XtCCallback, XtRCallback, sizeof(XtPointer), offset(menu.select), XtRCallback, (XtPointer)NULL}, + {XtNhighlightCallback, XtCCallback, XtRCallback, sizeof(XtPointer), + offset(menu.highlight), XtRCallback, (XtPointer)NULL}, {XtNmenu, XtCMenu, XtRPointer, sizeof(XtPointer), offset(menu.contents), XtRImmediate, (XtPointer)NULL}, {XtNcursor, XtCCursor, XtRCursor, sizeof(Cursor), @@ -1246,6 +1248,11 @@ remap_menubar (mw) if (new_selection && !new_selection->enabled) new_selection = NULL; + /* Call callback when the hightlighted item changes. */ + if (old_selection || new_selection) + XtCallCallbackList ((Widget)mw, mw->menu.highlight, + (XtPointer) new_selection); + /* updates old_state from new_state. It has to be done now because display_menu (called below) uses the old_stack to know what to display. */ for (i = last_same + 1; i < new_depth; i++)