From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: owner@emacsbugs.donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#1791: marked as done (23.0.60; Emacs.app may process events in wrong window) Date: Wed, 21 Jan 2009 19:10:04 +0000 Message-ID: References: <56208D0D-4A01-48DC-B227-3D55D4B0C827@gmail.com> <0A9924B3-BD99-44C7-A910-752BE89E956C@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1232565004-4828-0" X-Trace: ger.gmane.org 1232566262 4943 80.91.229.12 (21 Jan 2009 19:31:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Jan 2009 19:31:02 +0000 (UTC) To: Adrian Robert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 21 20:32:14 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LPinn-0002nY-E2 for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Jan 2009 20:31:51 +0100 Original-Received: from localhost ([127.0.0.1]:41734 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPimW-000485-1A for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Jan 2009 14:30:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPifn-0006bM-Hu for bug-gnu-emacs@gnu.org; Wed, 21 Jan 2009 14:23:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPifl-0006az-Ba for bug-gnu-emacs@gnu.org; Wed, 21 Jan 2009 14:23:35 -0500 Original-Received: from [199.232.76.173] (port=43534 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPifl-0006aw-3R for bug-gnu-emacs@gnu.org; Wed, 21 Jan 2009 14:23:33 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:37944) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LPifk-0002Xp-Eh for bug-gnu-emacs@gnu.org; Wed, 21 Jan 2009 14:23:32 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0LJNStR008341; Wed, 21 Jan 2009 11:23:28 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n0LJA5xs004926; Wed, 21 Jan 2009 11:10:05 -0800 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: closed 1791 X-Emacs-PR-Package: emacs,ns X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:24361 Archived-At: This is a multi-part message in MIME format... ------------=_1232565004-4828-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Wed, 21 Jan 2009 21:00:02 +0200 with message-id <56208D0D-4A01-48DC-B227-3D55D4B0C827@gmail.com> and subject line Re: Emacs.app may process events in wrong window has caused the Emacs bug report #1791, regarding 23.0.60; Emacs.app may process events in wrong window to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) --=20 1791: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D1791 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems ------------=_1232565004-4828-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 5 Jan 2009 20:57:33 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n05KvTPY028655 for ; Mon, 5 Jan 2009 12:57:30 -0800 Received: from mx10.gnu.org ([199.232.76.166]:34483) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LJwUl-0002gv-B1 for emacs-pretest-bug@gnu.org; Mon, 05 Jan 2009 15:56:19 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LJwVs-00039G-8e for emacs-pretest-bug@gnu.org; Mon, 05 Jan 2009 15:57:28 -0500 Received: from fg-out-1718.google.com ([72.14.220.158]:58548) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LJwVr-000392-Jq for emacs-pretest-bug@gnu.org; Mon, 05 Jan 2009 15:57:28 -0500 Received: by fg-out-1718.google.com with SMTP id l26so2870520fgb.30 for ; Mon, 05 Jan 2009 12:57:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:mime-version:to:message-id :content-type:from:subject:date:x-mailer; bh=92zaaUraxRSiIUIIOs8IvuSDPwSdf3iM1nbTEgJIEaQ=; b=VSMYxmCEwT5Y6RKGM8tO6hFmD/WyUVvVPCuZVsqcuiXIz7bzm/eezQmqTIH7j9Ldg+ Y3Asu7cnBxXEkfsBqPhkTn8Tedn/SH3Vw7kPfMzKMTRZQ6iqnN5uKQmnKC4/9pPFuKiy bJ6Tou1ozjI8QyU8aFMN/1cKo9PI60LfCPXGQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:to:message-id:content-type:from:subject:date:x-mailer; b=pxwL/+wfvBpW9ZqXz/aQIpBkdbQhkNq7lzGl/I1PpFjdpwcIkp1j64FvLv1TNhw/Jx JkM9PKChJr96D2KlI3H6EkWIkkGezVaIhnUZezjacGFThkOv1XZpbpVvHSP5ZLxmLaNo ktULH3x1wZ18hYU7e420mmINAoEhEumopvy5U= Received: by 10.86.59.2 with SMTP id h2mr4752755fga.30.1231189045558; Mon, 05 Jan 2009 12:57:25 -0800 (PST) Received: from ?212.144.125.107? (dialin-212-144-125-107.pools.arcor-ip.net [212.144.125.107]) by mx.google.com with ESMTPS id e11sm21646331fga.12.2009.01.05.12.57.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 05 Jan 2009 12:57:24 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v753.1) To: emacs-pretest-bug@gnu.org Message-Id: <0A9924B3-BD99-44C7-A910-752BE89E956C@gmail.com> Content-Type: multipart/mixed; boundary=Apple-Mail-1--521208054 From: Wolfgang Lux Subject: 23.0.60; Emacs.app may process events in wrong window Date: Mon, 5 Jan 2009 21:57:42 +0100 X-Mailer: Apple Mail (2.753.1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) --Apple-Mail-1--521208054 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: If Emacs.app is not the active application, events are always processed by the front-most window of Emacs rather than the intended window. For instance, start Emacs.app and create a new frame via Ctrl-X 5 b . There are now two frames displaying buffers *GNU Emacs* (in the back) and *scratch* (in the front). At this point activate, another application and click the close button of the frame displaying the *GNU Emacs* buffer (i.e., the back one). Emacs.app will close the window displaying the *scratch* buffer instead. The same happens when dragging text. Thus, in the scenario above, bring Terminal.app or TextEdit.app to the front and drag some text onto the *GNU Emacs* buffer (the back one). The text will appear in the *scratch* buffer instead of the *GNU Emacs*. The problem seems to be the EV_TRAILER macro in nsterm.m which sends events to SELECTED_FRAME() (apparently, the front-most window of Emacs.app) when the application is not active. I cannot imagine a reason for this code and have attached the obvious patch to fix the bug. --Apple-Mail-1--521208054 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name=nsterm.patch Content-Disposition: attachment; filename=nsterm.patch Index: src/nsterm.m =================================================================== RCS file: /sources/emacs/emacs/src/nsterm.m,v retrieving revision 1.41 diff -u -r1.41 nsterm.m --- src/nsterm.m 2 Jan 2009 18:58:52 -0000 1.41 +++ src/nsterm.m 5 Jan 2009 20:56:09 -0000 @@ -288,8 +288,7 @@ methods. Maybe it should even be a function. */ #define EV_TRAILER(e) \ { \ - XSETFRAME (emacs_event->frame_or_window, [NSApp isActive] ? \ - emacsframe : SELECTED_FRAME ()); \ + XSETFRAME (emacs_event->frame_or_window, emacsframe); \ if (e) emacs_event->timestamp = EV_TIMESTAMP (e); \ n_emacs_events_pending++; \ kbd_buffer_store_event_hold (emacs_event, q_event_ptr); \ --Apple-Mail-1--521208054 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed In GNU Emacs 23.0.60.1 (powerpc-apple-darwin8.11.0, NS apple- appkit-824.48) of 2009-01-05 on Onyx.local Windowing system distributor `Apple', version 10.3.824 configured using `configure '--with-ns'' --Apple-Mail-1--521208054-- ------------=_1232565004-4828-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 1791-done) by emacsbugs.donarmstrong.com; 21 Jan 2009 19:00:10 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.176]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0LJ06hW001834 for <1791-done@emacsbugs.donarmstrong.com>; Wed, 21 Jan 2009 11:00:08 -0800 Received: by ik-out-1112.google.com with SMTP id b32so243835ika.1 for <1791-done@emacsbugs.donarmstrong.com>; Wed, 21 Jan 2009 11:00:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:mime-version:content-type :message-id:cc:content-transfer-encoding:from:subject:date:to :x-mailer; bh=3k74O6ljIQvpLEsE6Dtr2w0yij/tLfGljoKzoF7Hkas=; b=VR909FNRoXlvefh77+OiKfmdtZLJtfUkqNZ/pkGDXNPn1jK+L/C4Xtb6cRI/q2zFIK bxnPqB9D7QNby/9lhm3C/GYAKihFwurKpIJ3aC1xun4dZRO6rKKqfwkWxVZSP3R7dEfs zbzZspYTfEkDsUMy1UaN97yeiOYl8/h2jtikQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:content-type:message-id:cc:content-transfer-encoding :from:subject:date:to:x-mailer; b=G/1kh5ZsFW/bj9dc2kzx/9pYT99HcfZz0a3An/77v3Ymr00Aw8lGFFbvFOmyH60FI9 Yso04uU5A/a9sMW6EonRqb2vURhY0TEG1fj4FrO9+S4NEd53kau91opWCBM0R/6Oi5GU /CJXp4kqFsRkFVOP3KMMq2DRx0ipmXUJXMqcw= Received: by 10.210.19.7 with SMTP id 7mr889001ebs.29.1232564405702; Wed, 21 Jan 2009 11:00:05 -0800 (PST) Received: from ?192.168.1.101? (h018098.gprs.dnafinland.fi [87.93.18.98]) by mx.google.com with ESMTPS id 24sm8488551eyx.45.2009.01.21.11.00.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 21 Jan 2009 11:00:04 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <56208D0D-4A01-48DC-B227-3D55D4B0C827@gmail.com> Cc: Wolfgang Lux Content-Transfer-Encoding: 7bit From: Adrian Robert Subject: Re: Emacs.app may process events in wrong window Date: Wed, 21 Jan 2009 21:00:02 +0200 To: 1791-done@emacsbugs.donarmstrong.com X-Mailer: Apple Mail (2.753.1) I have applied the patch (thanks!) and am closing the bug. I *believe* the ![NSApp isActive] -> SELECTED_FRAME() was to address an issue with multi-tty, however I cannot find any problems now with the patch applied. Hopefully it is simply that it is no longer needed. ------------=_1232565004-4828-0--