# HG changeset patch # User Miles Bader # Date 836459184 0 # Node ID 9aa89ea71d5b7a0a9ac25c68106e0ab0da02b5f0 # Parent 39f72de374b91f5cbadc367fdaf101541888fbb5 (lw_motif_menu_related_event_p): A predicate to identify keyboard events intended only for menus. diff -r 39f72de374b9 -r 9aa89ea71d5b lwlib/lwlib-Xm.c --- a/lwlib/lwlib-Xm.c Thu Jul 04 05:46:22 1996 +0000 +++ b/lwlib/lwlib-Xm.c Thu Jul 04 05:46:24 1996 +0000 @@ -119,6 +119,18 @@ } Boolean +lw_motif_menu_related_event_p (event) + XEvent event; +{ + Widget widget = XtWindowToWidget (event.xkey.display,event.xkey.window); + WidgetClass class = XtClass (widget); + return + class == xmMainWindowWidgetClass + || class == xmRowColumnWidgetClass + || class == xmMenuShellWidgetClass; +} + +Boolean lw_motif_widget_p (widget) Widget widget; {