From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: when to bind *down-mouse* vs *mouse*? Date: Mon, 6 Dec 2004 11:16:20 -0800 Message-ID: References: <874qj23pxi.fsf@confusibombus.emacswiki.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1102362033 28556 80.91.229.6 (6 Dec 2004 19:40:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 6 Dec 2004 19:40:33 +0000 (UTC) Cc: Luc Teirlinck , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 06 20:40:23 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CbOic-0005K6-00 for ; Mon, 06 Dec 2004 20:40:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CbOsN-00058c-Bx for ged-emacs-devel@m.gmane.org; Mon, 06 Dec 2004 14:50:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CbOrq-00057P-1x for emacs-devel@gnu.org; Mon, 06 Dec 2004 14:49:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CbOrn-00055y-4C for emacs-devel@gnu.org; Mon, 06 Dec 2004 14:49:52 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CbOrn-00055P-1r for emacs-devel@gnu.org; Mon, 06 Dec 2004 14:49:51 -0500 Original-Received: from [199.232.41.5] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CbOhl-0005RO-5o for emacs-devel@gnu.org; Mon, 06 Dec 2004 14:39:29 -0500 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by mx20.gnu.org with esmtp (Exim 4.34) id 1CbOLi-00050W-3F for emacs-devel@gnu.org; Mon, 06 Dec 2004 14:16:42 -0500 Original-Received: from agminet01.oracle.com (localhost [127.0.0.1]) by agminet01.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id iB6JGP3V021628; Mon, 6 Dec 2004 11:16:25 -0800 Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.191.50]) by agminet01.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id iB6JGNIT021602; Mon, 6 Dec 2004 11:16:23 -0800 Original-Received: from rgmsgw301.us.oracle.com (localhost [127.0.0.1]) by rgmsgw301.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id iB6JGMib001299; Mon, 6 Dec 2004 12:16:22 -0700 Original-Received: from dradamslap (dradams-lap.us.oracle.com [130.35.177.126]) by rgmsgw301.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with SMTP id iB6JGKZR001268 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Mon, 6 Dec 2004 12:16:21 -0700 Original-To: "Alex Schroeder" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-reply-to: <874qj23pxi.fsf@confusibombus.emacswiki.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Importance: Normal 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: main.gmane.org gmane.emacs.devel:30764 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30764 When the action creates a popup menu, I think we want to bind it to the mouse-down event. I seem to situations where the menu would disappear as soon as you released the mouse. If you released the mouse on a menu item, that menu item has been "chosen" by the user. It's not clear to me what you're saying here. I think you're suggesting, first, that binding to down-mouse lets the mouse-up event choose the menu item, and if the menu were bound to just mouse (mouse-up), then you would need to first click to bring up the menu, and then click again to choose the menu item. Is that what you mean? Are you also saying that there was (is?) a bug that caused the popup menu to disappear on mouse-up? Was that with the menu bound to down-mouse or just mouse (-up)? When I look at other applications running on Windows - that's all I have available right now -, they generally bring up a popup menu on mouse-up, not on mouse-down. That includes most popup menus in Microsoft applications (including Word, Outlook, Internet Explorer, Windows Explorer, Windows Media Player, and Windows XP dialog boxes), but also WinZIP, Framemaker, DreamWeaver, HomeSite, WS_FTP, SmartFTP, TextPad, TopStyle, and Irfanview. (There are some exceptions, notably Netscape, Acrobat, and MS Excel.) And these applications nevertheless let you keep the button pressed and release it on a menu item to choose the item. And they let you, alternatively, use separate clicks: one to bring up the menu, one to choose each submenu (if any), and one to choose a menu item. So, I would say that it is not clear that popup menus should be opened on down-mouse - the reasons given so far aren't convincing. I'm not saying that Emacs should necessarily behave like Windows apps; I'm just asking why it is a good idea to bind popup menu opening to down-mouse, rather than mouse (mouse-up). The question of S-down-mouse-1 on Windows is a separate issue. On platforms besides Windows, or if `w32-use-w32-font-dialog' is nil, a popup menu is displayed. But on Windows with `w32-use-w32-font-dialog' non-nil (default value), this just opens a dialog box. I see no reason to bind down-mouse instead of mouse (-up), just to bring up a dialog box. Similary, when the action involves a position, we want to use mouse-down. One example is yanking with the mouse. We want to yank where the user clicked the mouse button (down), not where the user released it. Conversely, when the action is triggered by clicking into some sensitive area (eg. buttons, links), then we should use mouse-up, so that the user can change his mind after mouse-down and move away from the button or link in order to cancel. These makes sense. Perhaps similar guidance should be in the Emacs (or Elisp) manual - especially the second paragraph, which is less obvious than the first. If so, the text should point out that the second criterion overrides the first (a button or link also "involves a position"). Thanks, Drew