From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andrew Choi Newsgroups: gmane.emacs.devel Subject: Re: mac - crash when scrolling wheely mouse when all frames are minimized Date: Mon, 20 Jan 2003 09:20:28 -0700 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200301201534.h0KFYZJt000393@coco.shootybangbang.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT X-Trace: main.gmane.org 1043080132 16208 80.91.224.249 (20 Jan 2003 16:28:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 20 Jan 2003 16:28:52 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18aelP-000445-00 for ; Mon, 20 Jan 2003 17:27:07 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18aewL-0006zB-00 for ; Mon, 20 Jan 2003 17:38:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18aelo-0003VX-06 for emacs-devel@quimby.gnus.org; Mon, 20 Jan 2003 11:27:32 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18aelF-0003Rs-00 for emacs-devel@gnu.org; Mon, 20 Jan 2003 11:26:57 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18aekO-00031B-00 for emacs-devel@gnu.org; Mon, 20 Jan 2003 11:26:04 -0500 Original-Received: from shawidc-mo1.cg.shawcable.net ([24.71.223.10] helo=pd3mo3so.prod.shaw.ca) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18aefD-0001Sx-00 for emacs-devel@gnu.org; Mon, 20 Jan 2003 11:20:43 -0500 Original-Received: from pd2mr4so.prod.shaw.ca (pd2mr4so-ser.prod.shaw.ca [10.0.141.107])2002)) with ESMTP id <0H9000GIZTE7L6@l-daemon> for emacs-devel@gnu.org; Mon, 20 Jan 2003 09:20:31 -0700 (MST) Original-Received: from pn2ml10so.prod.shaw.ca (pn2ml10so-qfe0.prod.shaw.ca [10.0.121.80]) by l-daemon (iPlanet Messaging Server 5.1 HotFix 0.8 (built May 12 2002)) with ESMTP id <0H900037PTE6PY@l-daemon> for emacs-devel@gnu.org; Mon, 20 Jan 2003 09:20:30 -0700 (MST) Original-Received: from owlbear.local.shawmail (h68-144-207-94.cg.shawcable.net [68.144.207.94]) by l-daemon (iPlanet Messaging Server 5.1 HotFix 0.8 (built May 12 2002)) with ESMTP id <0H90004GFTE67V@l-daemon> for emacs-devel@gnu.org; Mon, 20 Jan 2003 09:20:30 -0700 (MST) In-reply-to: <200301201534.h0KFYZJt000393@coco.shootybangbang.com> Original-To: jpw@shootybangbang.com (John Paul Wallington) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-Lines: 34 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:10896 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10896 jpw@shootybangbang.com (John Paul Wallington) writes: > On Mac OS X.1.5, minimizing all frames (but ensuring that Emacs has the > focus; the global menubar is Emacs') then scrolling the mouse wheel > causes a crash: > > Program received signal EXC_BAD_ACCESS, Could not access memory. > 0x0013d2dc in XTread_socket (sd=0, bufp=0xbffd11c8, numchars=2407900, expected=-1073934024) at macterm.c:12660 > 12660 XSETFRAME (bufp->frame_or_window, mwp->mFP); I don't use a wheel mouse so I can't test this. But please try adding the following lines: if (!IsValidWindowPtr (window_ptr)) { SysBeep (1); UNBLOCK_INPUT; return 0; } in macterm.c (XTread_socket): case kEventClassMouse: if (GetEventKind (eventRef) == kEventMouseWheelMoved) { SInt32 delta; Point point; WindowPtr window_ptr = FrontNonFloatingWindow (); struct mac_output *mwp = (mac_output *) GetWRefCon (window_ptr); <=== add the code here GetEventParameter(eventRef, kEventParamMouseWheelDelta, typeSInt32, NULL, sizeof (SInt32), NULL, &delta);