* macterm.c (XTread_socket): Check that FrontNonFloatingWindow
returns a valid window pointer before proceeding for keyDown and
autoKey events.
+2002-08-04 Andrew Choi <akochoi@shaw.ca>
+
+ * macterm.c (XTread_socket): Check that FrontNonFloatingWindow
+ returns a valid window pointer before proceeding for keyDown and
+ autoKey events.
+
2002-08-03 Andrew Choi <akochoi@shaw.ca>
* macterm.c (USE_CARBON_EVENTS): New macro.
#if USE_CARBON_EVENTS
rneResult = ReceiveNextEvent (0, NULL,
- expected ? TicksToEventTime(app_sleep_time) : 0,
+ expected
+ ? TicksToEventTime (app_sleep_time)
+ : 0,
true, &eventRef);
if (!rneResult)
{
int keycode = (er.message & keyCodeMask) >> 8;
int xkeysym;
+ if (!IsValidWindowPtr (FrontNonFloatingWindow ()))
+ {
+ SysBeep (1);
+ UNBLOCK_INPUT;
+ return 0;
+ }
+
ObscureCursor ();
if (keycode == 0x33) /* delete key (charCode translated to 0x8) */