From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#17736: 24.4.50; *-mouse-1 acts on wrong frame Date: Sun, 8 Jun 2014 08:05:58 -0700 (PDT) Message-ID: <7d37f10e-380f-41dd-884b-8f41003436d0@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1402240058 7174 80.91.229.3 (8 Jun 2014 15:07:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Jun 2014 15:07:38 +0000 (UTC) To: 17736@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 08 17:07:30 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wtegx-0004Al-Ff for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Jun 2014 17:07:27 +0200 Original-Received: from localhost ([::1]:56744 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wtegw-000052-Vl for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Jun 2014 11:07:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wtegj-0008WT-Ot for bug-gnu-emacs@gnu.org; Sun, 08 Jun 2014 11:07:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WtegZ-0005vQ-CT for bug-gnu-emacs@gnu.org; Sun, 08 Jun 2014 11:07:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtegZ-0005vD-8i for bug-gnu-emacs@gnu.org; Sun, 08 Jun 2014 11:07:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WtegY-0000os-Rk for bug-gnu-emacs@gnu.org; Sun, 08 Jun 2014 11:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Jun 2014 15:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17736 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14022399953097 (code B ref -1); Sun, 08 Jun 2014 15:07:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Jun 2014 15:06:35 +0000 Original-Received: from localhost ([127.0.0.1]:41505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wteg6-0000nt-GE for submit@debbugs.gnu.org; Sun, 08 Jun 2014 11:06:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54352) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wteg3-0000nb-S5 for submit@debbugs.gnu.org; Sun, 08 Jun 2014 11:06:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wtefo-0005fo-8q for submit@debbugs.gnu.org; Sun, 08 Jun 2014 11:06:26 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:53744) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wtefn-0005fk-UQ for submit@debbugs.gnu.org; Sun, 08 Jun 2014 11:06:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56006) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wteff-00081A-46 for bug-gnu-emacs@gnu.org; Sun, 08 Jun 2014 11:06:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WtefW-0005di-Cj for bug-gnu-emacs@gnu.org; Sun, 08 Jun 2014 11:06:07 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:45208) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtefW-0005dZ-5p for bug-gnu-emacs@gnu.org; Sun, 08 Jun 2014 11:05:58 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s58F5vQg002473 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 8 Jun 2014 15:05:57 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s58F5ufL021235 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 8 Jun 2014 15:05:56 GMT Original-Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s58F5uop023232 for ; Sun, 8 Jun 2014 15:05:56 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:90180 Archived-At: Put this code in a file: ------------------------- (defun 1on1-emacs () "" (interactive) (setq default-frame-alist (list (cons 'minibuffer nil))) (setq pop-up-frames t) (setq minibuffer-frame-alist 1on1-minibuffer-frame-alist) (make-frame 1on1-minibuffer-frame-alist) (setq minibuffer-auto-raise t) (setq w32-grab-focus-on-raise nil)) (global-set-key [C-S-mouse-1] =09=09(lambda () (interactive) (message "FR: %S" (selected-frame)))) ------------------------- runemacs.exe -Q --debug-init -l "onetest.el" -f "1on1-emacs" C-x b *Messages* C-x 5 2 C-x b *scratch* You now have a frame showing *Messages*, a frame showing *scratch*, and a standalone minibuffer frame. Make the first two frames small enough that you can see both of them and the minibuffer frame. 1. Click `mouse-1' in the *scratch* frame, or otherwise select it and give it focus. 2. Click `C-S-mouse-1' in the *scratch* frame. You see the message indicating that this is the selected frame. Click `C-S-mouse-1' in the *Messages* frame. Again, the message indicates that the clicked frame is the (newly) selected frame. 3. Repeat #1, to select frame *scratch*. `M-x', then click `C-S-mouse-1' in the *Messages* frame (*not* the selected frame before you clicked). You again see a message indicating that the clicked frame (*Messages*) is the (newly) selected frame. 4. With *scratch* still the selected frame, `M-x', then click in frame *scratch* (the selected frame before you clicked). The message says that the standalone minibuffer frame is the selected frame. 1-3 are normal. #4 is the bug. A command bound to `C-S-mouse-1' does not act on the frame that you click. The same behavior occurs if you use `S-mouse-1', `C-mouse-1', or even `mouse-1' instead of `C-S-mouse-1' in the recipe (but you may also need to set `*-down-mouse-1' to nil). In sum, a mouse click while the minibuffer is active does this: * Acts on the clicked frame, if it was not the frame selected before activating the minibuffer (or if is is the minibuffer frame). This is what I would expect. * Acts on the minibuffer frame, if the clicked frame was selected before activating the minibuffer. This is not what I would expect (unless the frame clicked is the minibuffer frame). I would expect that the frame clicked always becomes the selected frame. Is this expectation wrong? I ask the question about whether the behavior should be exceptional this way, because it is not new behavior: it is at least as old as Emacs 20. It's not clear to me why Emacs behaves this way. In GNU Emacs 24.4.50.1 (i686-pc-mingw32) of 2014-06-01 on ODIEONE Bzr revision: 117212 michael.albinus@gmx.de-20140601104945-g88x0mwrxorz302h Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D/c/Devel/emacs/snapshot/trunk --enable-checking=3Dyes,glyphs 'CFLAGS=3D-O0 -g3' LDFLAGS=3D-Lc:/Devel/emacs/lib 'CPPFLAGS=3D-DGC_MCHECK=3D1 -Ic:/Devel/emacs/include''