changeset 6115:e3d6c30a3906

(xmenu_show): Test XtWindowToWidget before inserting into the event_queue.
author Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr>
date Mon, 28 Feb 1994 13:03:13 +0000
parents b69bdef4f7f6
children 64417bbbb128
files src/xmenu.c
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/xmenu.c	Mon Feb 28 12:57:12 1994 +0000
+++ b/src/xmenu.c	Mon Feb 28 13:03:13 1994 +0000
@@ -1323,13 +1323,16 @@
 	}
 
       XtDispatchEvent (&event);
-      queue_tmp = (struct event_queue *) malloc (sizeof (struct event_queue));
-
-      if (queue_tmp != NULL) 
+      if (XtWindowToWidget(event.xany.window) != menu)
 	{
-	  queue_tmp->event = event;
-	  queue_tmp->next = queue;
-	  queue = queue_tmp;
+	  queue_tmp = (struct event_queue *) malloc (sizeof (struct event_queue));
+
+	  if (queue_tmp != NULL) 
+	    {
+	      queue_tmp->event = event;
+	      queue_tmp->next = queue;
+	      queue = queue_tmp;
+	    }
 	}
     }