]> git.eshelyaron.com Git - emacs.git/commitdiff
(lw_motif_menu_related_event_p): A predicate to identify keyboard events
authorMiles Bader <miles@gnu.org>
Thu, 4 Jul 1996 05:46:24 +0000 (05:46 +0000)
committerMiles Bader <miles@gnu.org>
Thu, 4 Jul 1996 05:46:24 +0000 (05:46 +0000)
intended only for menus.

lwlib/lwlib-Xm.c

index 57e4b4a2ca5cd9d32c059cc4965f33687f34f543..5df98c1d6845f74450ec0c2ba7be9141fa308632 100644 (file)
@@ -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;