summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-07-04 05:46:24 +0000
committerMiles Bader <miles@gnu.org>1996-07-04 05:46:24 +0000
commitb33b97815752deed74d9cfb77a3814fa8c26a023 (patch)
tree704c6a2d184dc3a58ed81690f7ffacfc753f7afc
parent6735fffb75973253a9936aa86fc61be59631fa01 (diff)
downloademacs-b33b97815752deed74d9cfb77a3814fa8c26a023.tar.gz
(lw_motif_menu_related_event_p): A predicate to identify keyboard events
intended only for menus.
-rw-r--r--lwlib/lwlib-Xm.c12
1 files changed, 12 insertions, 0 deletions
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
@@ -119,6 +119,18 @@ first_child (widget)
}
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;
{