From 7f76dcc0ad1eb1f58465676ccaa3b02f362619fc Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 4 Jul 1996 05:46:24 +0000 Subject: [PATCH] (lw_motif_menu_related_event_p): A predicate to identify keyboard events intended only for menus. --- lwlib/lwlib-Xm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c index 57e4b4a2ca5..5df98c1d684 100644 --- a/lwlib/lwlib-Xm.c +++ b/lwlib/lwlib-Xm.c @@ -118,6 +118,18 @@ first_child (widget) return ((CompositeWidget)widget)->composite.children [0]; } +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; -- 2.39.2