aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFred Pierresteguy1994-02-28 13:03:13 +0000
committerFred Pierresteguy1994-02-28 13:03:13 +0000
commit0f7159e3b0331a7758bb56a5cb0e187b5764b208 (patch)
tree9da4f35a5bb8b6c0eaa5f71ff11f195044c9982c /src
parent82aebaf480f10493a04c841aa7cfdf64e9c053cb (diff)
downloademacs-0f7159e3b0331a7758bb56a5cb0e187b5764b208.tar.gz
emacs-0f7159e3b0331a7758bb56a5cb0e187b5764b208.zip
(xmenu_show): Test XtWindowToWidget before inserting into the event_queue.
Diffstat (limited to 'src')
-rw-r--r--src/xmenu.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 46968f83e0c..2133ad51538 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1323,13 +1323,16 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error)
1323 } 1323 }
1324 1324
1325 XtDispatchEvent (&event); 1325 XtDispatchEvent (&event);
1326 queue_tmp = (struct event_queue *) malloc (sizeof (struct event_queue)); 1326 if (XtWindowToWidget(event.xany.window) != menu)
1327
1328 if (queue_tmp != NULL)
1329 { 1327 {
1330 queue_tmp->event = event; 1328 queue_tmp = (struct event_queue *) malloc (sizeof (struct event_queue));
1331 queue_tmp->next = queue; 1329
1332 queue = queue_tmp; 1330 if (queue_tmp != NULL)
1331 {
1332 queue_tmp->event = event;
1333 queue_tmp->next = queue;
1334 queue = queue_tmp;
1335 }
1333 } 1336 }
1334 } 1337 }
1335 1338