Mercurial > emacs
comparison src/macterm.c @ 46805:0139d2dce230
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.
author | Andrew Choi <akochoi@shaw.ca> |
---|---|
date | Sun, 04 Aug 2002 19:29:06 +0000 |
parents | a8e027c9c403 |
children | eba75fedd593 |
comparison
equal
deleted
inserted
replaced
46804:d729c9804513 | 46805:0139d2dce230 |
---|---|
12608 if (NILP (Fboundp (Qmac_ready_for_drag_n_drop))) | 12608 if (NILP (Fboundp (Qmac_ready_for_drag_n_drop))) |
12609 event_mask -= highLevelEventMask; | 12609 event_mask -= highLevelEventMask; |
12610 | 12610 |
12611 #if USE_CARBON_EVENTS | 12611 #if USE_CARBON_EVENTS |
12612 rneResult = ReceiveNextEvent (0, NULL, | 12612 rneResult = ReceiveNextEvent (0, NULL, |
12613 expected ? TicksToEventTime(app_sleep_time) : 0, | 12613 expected |
12614 ? TicksToEventTime (app_sleep_time) | |
12615 : 0, | |
12614 true, &eventRef); | 12616 true, &eventRef); |
12615 if (!rneResult) | 12617 if (!rneResult) |
12616 { | 12618 { |
12617 /* Handle new events */ | 12619 /* Handle new events */ |
12618 if (!mac_convert_event_ref (eventRef, &er)) | 12620 if (!mac_convert_event_ref (eventRef, &er)) |
12867 case autoKey: | 12869 case autoKey: |
12868 { | 12870 { |
12869 int keycode = (er.message & keyCodeMask) >> 8; | 12871 int keycode = (er.message & keyCodeMask) >> 8; |
12870 int xkeysym; | 12872 int xkeysym; |
12871 | 12873 |
12874 if (!IsValidWindowPtr (FrontNonFloatingWindow ())) | |
12875 { | |
12876 SysBeep (1); | |
12877 UNBLOCK_INPUT; | |
12878 return 0; | |
12879 } | |
12880 | |
12872 ObscureCursor (); | 12881 ObscureCursor (); |
12873 | 12882 |
12874 if (keycode == 0x33) /* delete key (charCode translated to 0x8) */ | 12883 if (keycode == 0x33) /* delete key (charCode translated to 0x8) */ |
12875 { | 12884 { |
12876 bufp->code = 0x7f; | 12885 bufp->code = 0x7f; |