From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: ignore mouse-wheel press during rotation Date: Sat, 04 Feb 2006 11:52:56 -0500 Message-ID: <87mzh7kres.fsf-monnier+emacs@gnu.org> References: <43E32E51.7010706@gnu.org> <873bj0m4ei.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1139090803 31737 80.91.229.2 (4 Feb 2006 22:06:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 4 Feb 2006 22:06:43 +0000 (UTC) Cc: emacs-devel@gnu.org, drew.adams@oracle.com, jasonr@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 04 23:06:39 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F5VYC-0002aR-Td for ged-emacs-devel@m.gmane.org; Sat, 04 Feb 2006 23:06:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F5V0G-0004oC-1c for ged-emacs-devel@m.gmane.org; Sat, 04 Feb 2006 16:31:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F5UpL-00028s-M3 for emacs-devel@gnu.org; Sat, 04 Feb 2006 16:20:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F5UpG-00027F-4N for emacs-devel@gnu.org; Sat, 04 Feb 2006 16:20:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F5UY2-0004Z0-LD for emacs-devel@gnu.org; Sat, 04 Feb 2006 16:02:22 -0500 Original-Received: from [209.226.175.54] (helo=tomts10-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F5Qh8-0004ZP-9y; Sat, 04 Feb 2006 11:55:30 -0500 Original-Received: from alfajor ([67.71.25.142]) by tomts10-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060204165256.EFBF14963.tomts10-srv.bellnexxia.net@alfajor>; Sat, 4 Feb 2006 11:52:56 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id 58F13D7466; Sat, 4 Feb 2006 11:52:56 -0500 (EST) Original-To: Eli Zaretskii In-Reply-To: (Eli Zaretskii's message of "Sat, 04 Feb 2006 15:06:55 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:50001 Archived-At: >> > I don't think this is something that can be easily solved by ignoring >> > certain events, since it is impossible to know the user's real >> > intention and we are as likely to frustrate the user as help them. >> >> We should probably just ignore mouse-[45] events while mouse-2 is pressed >> (i.e. after down-mouse-2 but before the corresponding mouse-2). > You mean, to add the complementary code that ignores mouse-[45] after > mouse-2, like mouse-2 is now ignored after mouse-[45]? Yes and no: the idea is similar, but I think a different implementation should be used. The current code ignores mouse-2 events if they occur shortly after a mouse-wheel operation. What I propose does not depend on time: mouse-wheel events should be ignored for as long as mouse-2 is pressed. In case you have a drag-like operation bound to mouse-2 this can make a big difference. After all, if the accidental mouse-wheel happens before down-mouse-2, there's no way for us to ignore it (we can't know yet that a down-mouse-2 is coming and the current mwheel-inhibit-click code will actually decide to ignore the down-mouse-2 event instead). In my experience involontary wheel events don't happen when I release the mouse-2 button, but if they do, then yes, maybe mouse-wheel events should also be ignored for a little while after the mouse-2 release, just like the current code does for mouse-2-after-mouse-wheel. Stefan