Commit 44fab9c1 authored by Andrew Choi's avatar Andrew Choi
Browse files

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.
parent 3a321ddb
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.
......
......@@ -12610,7 +12610,9 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
#if USE_CARBON_EVENTS
rneResult = ReceiveNextEvent (0, NULL,
expected ? TicksToEventTime(app_sleep_time) : 0,
expected
? TicksToEventTime (app_sleep_time)
: 0,
true, &eventRef);
if (!rneResult)
{
......@@ -12869,6 +12871,13 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
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) */
......
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