From 539e69a9fd648d083c27aa5afd5d70d60cfae1ca Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Mon, 20 Jan 2003 16:53:38 +0000 Subject: [PATCH] * macterm.c (XTread_socket): Checks for valid, visible window before sending a scroll-wheel event. --- src/ChangeLog | 5 +++++ src/macterm.c | 7 +++++++ 2 files changed, 12 insertions(+) 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); -- 2.39.2