}
}
+ /* Don't generate a menu bar event if ITEM is
+ nil. */
+ if (NILP (item))
+ return Qnil;
+
/* ELisp manual 2.4b says (x y) are window
relative but code says they are
frame-relative. */
#endif /* HAVE_WINDOW_SYSTEM */
f = XFRAME (event->frame_or_window);
+
+ if (!FRAME_LIVE_P (f))
+ return Qnil;
+
id = event->arg;
x = event->x;
y = event->y;
bool close;
#endif /* HAVE_WINDOW_SYSTEM */
+ if (!FRAME_LIVE_P (f))
+ return Qnil;
+
id = event->arg;
x = event->x;
y = event->y;
}
}
+ /* Don't generate a menu bar event if ITEM is
+ nil. */
+ if (NILP (item))
+ return Qnil;
+
/* ELisp manual 2.4b says (x y) are window
relative but code says they are
frame-relative. */
struct frame *f = XFRAME (event->frame_or_window);
evt = Qnil;
+ if (!FRAME_LIVE_P (f))
+ return Qnil;
+
for (tem = event->arg; CONSP (tem); tem = XCDR (tem))
{
it = XCAR (tem);
y = XCAR (XCDR (it));
id = XCAR (XCDR (XCDR (it)));
+ /* Don't report touches to the menu bar. */
+ if (EQ (id, menu_bar_touch_id))
+ continue;
+
position = make_lispy_position (f, x, y, event->timestamp);
evt = Fcons (Fcons (id, position), evt);
}
+ if (NILP (evt))
+ /* Don't return an event if the touchpoint list is
+ empty. */
+ return Qnil;
+
return list2 (Qtouchscreen_update, evt);
}