From: Steven Tamm Date: Mon, 20 Jan 2003 16:53:38 +0000 (+0000) Subject: * macterm.c (XTread_socket): Checks for valid, visible window X-Git-Tag: ttn-vms-21-2-B4~11562 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=539e69a9fd648d083c27aa5afd5d70d60cfae1ca;p=emacs.git * macterm.c (XTread_socket): Checks for valid, visible window before sending a scroll-wheel event. --- diff --git a/src/ChangeLog b/src/ChangeLog index 3f0eb5db6a9..c110217d1e6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-01-20 Steven Tamm + + * macterm.c (XTread_socket): Checks for valid, visible window + before sending a scroll-wheel event. + 2003-01-20 Richard M. Stallman * xdisp.c (redisplay_window): If mini window's buffer is not diff --git a/src/macterm.c b/src/macterm.c index cae4172854e..e969a4b6dce 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -12644,6 +12644,13 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) Point point; WindowPtr window_ptr = FrontNonFloatingWindow (); struct mac_output *mwp = (mac_output *) GetWRefCon (window_ptr); + if (!IsValidWindowPtr (window_ptr)) + { + SysBeep(1); + UNBLOCK_INPUT; + return 0; + } + GetEventParameter(eventRef, kEventParamMouseWheelDelta, typeSInt32, NULL, sizeof (SInt32), NULL, &delta);