From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.bugs Subject: bug#3303: delete-frame raises old (invisible) frame Date: Tue, 19 May 2009 22:07:00 -0400 Message-ID: References: <2C87549A-2553-4477-BF77-6258A1CC32BE@gmail.com> <6A510E91-6262-44CF-AA62-315DECB52EF6@gmail.com> <90E34251-C034-4169-91FE-22A28C94901F@gmail.com> <73A0DAB1-9D16-4E35-A9F7-E9E4CCEACC50@gmail.com> <5C67F4CF-F798-4972-90DE-0489B1E10706@gmail.com> Reply-To: David Reitter , 3303@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v935.3) Content-Type: multipart/signed; boundary=Apple-Mail-7-337531945; micalg=sha1; protocol="application/pkcs7-signature" X-Trace: ger.gmane.org 1242787016 16410 80.91.229.12 (20 May 2009 02:36:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 May 2009 02:36:56 +0000 (UTC) Cc: 3303@emacsbugs.donarmstrong.com To: Stefan Monnier , Adrian Robert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 20 04:36:48 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 1M6bfg-0002W3-EF for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 May 2009 04:36:47 +0200 Original-Received: from localhost ([127.0.0.1]:48677 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M6bfe-00043E-V1 for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 May 2009 22:36:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M6bbH-0002n5-TU for bug-gnu-emacs@gnu.org; Tue, 19 May 2009 22:32:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M6bbD-0002kV-Bf for bug-gnu-emacs@gnu.org; Tue, 19 May 2009 22:32:11 -0400 Original-Received: from [199.232.76.173] (port=45371 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M6bbD-0002kP-0F for bug-gnu-emacs@gnu.org; Tue, 19 May 2009 22:32:07 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:42920) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M6bbC-0002ix-D0 for bug-gnu-emacs@gnu.org; Tue, 19 May 2009 22:32:06 -0400 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 n4K2Vvat028724; Tue, 19 May 2009 19:31:57 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n4K2F46c023336; Tue, 19 May 2009 19:15:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: David Reitter Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 20 May 2009 02:15:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3303 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3303-submit@emacsbugs.donarmstrong.com id=B3303.124278523621726 (code B ref 3303); Wed, 20 May 2009 02:15:04 +0000 Original-Received: (at 3303) by emacsbugs.donarmstrong.com; 20 May 2009 02:07:16 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail-ew0-f178.google.com (mail-ew0-f178.google.com [209.85.219.178]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n4K27BpH021719 for <3303@emacsbugs.donarmstrong.com>; Tue, 19 May 2009 19:07:13 -0700 Original-Received: by ewy26 with SMTP id 26so244357ewy.1 for <3303@emacsbugs.donarmstrong.com>; Tue, 19 May 2009 19:07:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:mime-version:subject:date:references :x-mailer; bh=7NKRwAjfmgMMzuEfTY8BoiTXzQa23Vma98wPrgl+xeo=; b=JsAr9ts8OlpnrSiZsgwMMevXfC1kFImPvYAupTgPGsB7fPtIKq+zkwtNol2MP4A2Ym d/0vcb1wkoW45dlKR+KMmN0Cs8Ybi9yB/Eq8grsjapGTD+EzvSR9/equK3UQhXpIBm1T smpv4+TbfIVgO19MGFuPNMtAzyTls1Tr1uYFo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type:mime-version:subject :date:references:x-mailer; b=dqibmutBPv1oA8LwqxfNQ0dxtR1WhxoJIlXDrB8f4qSNGoI8inrucs8As45zeFll/G os06HyAP1NYo4/7GuHp59q3NuuUyMwW4sR47ti5zmhCBs7A1Y9BURelgDqNkUC/F5lU0 rN9xsj+lpwryZfJg11iAMlT3j/dAOxvz1sGPI= Original-Received: by 10.210.36.8 with SMTP id j8mr5726903ebj.44.1242785226201; Tue, 19 May 2009 19:07:06 -0700 (PDT) Original-Received: from ?192.168.1.42? (pool-71-162-19-47.pitbpa.east.verizon.net [71.162.19.47]) by mx.google.com with ESMTPS id 28sm1114965eye.16.2009.05.19.19.07.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 19 May 2009 19:07:05 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.935.3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Tue, 19 May 2009 22:32:11 -0400 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:28040 Archived-At: --Apple-Mail-7-337531945 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On May 18, 2009, at 10:56 PM, David Reitter wrote: > The doc string says that the system may select it, and that's > exactly what happens here on Cocoa/OSX. > This reproduces the problem just as well: > > (progn > (make-frame-invisible (selected-frame) t) > (select-frame (make-frame)) > (delete-frame (selected-frame) t) > (select-frame (make-frame)) > (sit-for 0) > (delete-frame (selected-frame) t)) > > i.e. we end up with a visible frame, the frame that we hid initially. OK, I have traced this a bit further and reduced it to this: (progn (setq aa1 (selected-frame)) (make-frame-invisible (selected-frame) t) (setq aa2 (selected-frame) aa2v (frame-visible-p (selected-frame))) (sit-for 1) (setq aa3 (selected-frame) aa3v (frame-visible-p (selected-frame)))) (list aa1 aa2 aa2v aa3 aa3v) After evaluating the first sexp (Emacs -Q), one can see that the selected frame doesn't change at any point. But aa2v is nil (correctly so), and aa3v is suddenly t. This does not happen with Emacs 22/Appkit. Both aa2v and aa3v are nil, as they should. Could someone check what the behavior is in another port (of 23)? I believe that this is the cause of the problems we're after. In the previous examples, when delete_frame calls do_switch_frame, the frame is already deemed visible, even though it hasn't been made visible through the appropriate system call. The above example demonstrates that something (in the event loop, presumably) sets frame visibility. It is not a call to FRAME_SAMPLE_VISIBILITY, which is done in `frame- visible-p' anyways. (The NS port always sets f->async_visible and lets this macro set ->visible later.) --Apple-Mail-7-337531945 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIFxDCCAn0w ggHmo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