changeset 34335:8a6f81835a8d

(xm_arm_callback): Fix last change.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 07 Dec 2000 12:33:32 +0000
parents 9afdcab7bfa5
children d7b47d919ef3
files lwlib/lwlib-Xm.c
diffstat 1 files changed, 15 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/lwlib/lwlib-Xm.c	Thu Dec 07 12:20:55 2000 +0000
+++ b/lwlib/lwlib-Xm.c	Thu Dec 07 12:33:32 2000 +0000
@@ -265,26 +265,23 @@
   widget_value *wv = (widget_value *) client_data;
   widget_instance *instance;
 
-  /* During the pretest of 21.1, there was a case where this callback
-     was called with a null widget on hpux 10.2.  I think that's
-     likely a bug in the Motif lib there.  */
+  /* Get the id of the menu bar or popup menu this widget is in.  */
+  while (w != None)
+    {
+      if (XmIsRowColumn (w))
+	{
+	  unsigned char type = 0xff;
+
+	  XtVaGetValues (w, XmNrowColumnType, &type, NULL);
+	  if (type == XmMENU_BAR || type == XmMENU_POPUP)
+	    break;
+	}
+
+      w = XtParent (w);
+    }
+
   if (w != None)
     {
-      /* Get the id of the menu bar or popup menu this widget is in.  */
-      while (1)
-	{
-	  if (XmIsRowColumn (w))
-	    {
-	      unsigned char type = 0xff;
-
-	      XtVaGetValues (w, XmNrowColumnType, &type, NULL);
-	      if (type == XmMENU_BAR || type == XmMENU_POPUP)
-		break;
-	    }
-
-	  w = XtParent (w);
-	}
-
       instance = lw_get_widget_instance (w);
       if (instance && instance->info->highlight_cb)
 	{