summaryrefslogtreecommitdiff
path: root/lwlib
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
commit7f76dcc0ad1eb1f58465676ccaa3b02f362619fc (patch)
tree6a483274e5b4c9b39a314652f7b02e666273c948 /lwlib
parentd7e4738238a2a2bdc958cd01f1dac3fa1d84c910 (diff)
downloademacs-7f76dcc0ad1eb1f58465676ccaa3b02f362619fc.tar.gz
(lw_motif_menu_related_event_p): A predicate to identify keyboard events
intended only for menus.
Diffstat (limited to 'lwlib')
-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;
{