Commit 0f7159e3 authored by Fred Pierresteguy's avatar Fred Pierresteguy

(xmenu_show): Test XtWindowToWidget before inserting into the event_queue.

parent 82aebaf4
......@@ -1323,13 +1323,16 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error)
}
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;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment