From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.devel Subject: Re: Subject: w32 mouse wheel handling Date: Sun, 25 May 2003 00:17:31 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <871xynu0bo.fsf@cs.cmu.edu> References: <25058549.1053701279594.JavaMail.www@wwinf0601> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1053836447 22964 80.91.224.249 (25 May 2003 04:20:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 25 May 2003 04:20:47 +0000 (UTC) Cc: emacs-devel Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun May 25 06:20:46 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19Jmzg-0005xO-00 for ; Sun, 25 May 2003 06:20:24 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19JnCC-0007uP-00 for ; Sun, 25 May 2003 06:33:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19JmzS-0006VX-5t for emacs-devel@quimby.gnus.org; Sun, 25 May 2003 00:20:10 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19Jmz8-0006SR-Jx for emacs-devel@gnu.org; Sun, 25 May 2003 00:19:50 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19Jmz7-0006SG-Bg for emacs-devel@gnu.org; Sun, 25 May 2003 00:19:49 -0400 Original-Received: from md5i.dsl.telerama.com ([205.201.10.244] helo=maru) by monty-python.gnu.org with esmtp (Exim 4.20) id 19Jmz6-0006SC-RY for emacs-devel@gnu.org; Sun, 25 May 2003 00:19:49 -0400 Original-Received: from md5i by maru with local (Exim 3.36 #1 (Debian)) id 19Jmwt-0007ZZ-00; Sun, 25 May 2003 00:17:31 -0400 Original-To: david.ponce@wanadoo.fr In-Reply-To: <25058549.1053701279594.JavaMail.www@wwinf0601> (David PONCE's message of "Fri, 23 May 2003 16:47:59 +0200 (CEST)") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) 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:14223 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:14223 David PONCE writes: > Another annoying thing with the way mouse wheel events are handled in > NT Emacs, is that it is impossible to directly bind commands to scroll > up or down events, nor to bind commands to mouse wheel events on the > mode line or header line only, like in X. For example, I can't do > something like this ;-) > > (global-set-key [mode-line mouse-4] 'mode-line-unbury-buffer) > (global-set-key [mode-line mouse-5] 'mode-line-bury-buffer) > > I submit you the following patch to handle mouse wheel events in NT > Emacs like in X, that is as mouse click events. Scrolling the wheel > up produces mouse-4 events, and scrolling the wheel down produces > mouse-5 events, eventually prefixed by header or mode line depending > on the mouse location :-) > > Finally, handling all mouse events in an uniform way seems to have > fixed the performance problem mentioned above :-) I would agree with this. When I wrote the original mouse wheel support (now long since changed to better implementations), I created the mouse-wheel event because (to the best of my knowlede, at the time at least) these events hadn't been standardized into a mouse-4/mouse-5 event at that time in X. -- Michael Welsh Duggan (md5i@cs.cmu.edu)