unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>,
	Adrian Robert <adrian.b.robert@gmail.com>
Cc: 3303@emacsbugs.donarmstrong.com
Subject: bug#3303: delete-frame raises old (invisible) frame
Date: Tue, 19 May 2009 22:07:00 -0400	[thread overview]
Message-ID: <B4093C5B-E9C3-43C8-B6B3-744CDD785596@gmail.com> (raw)
In-Reply-To: <E2714715-A223-4D47-904B-1A40CC3A998E@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1686 bytes --]

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.)



[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2193 bytes --]

  parent reply	other threads:[~2009-05-20  2:07 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-16  1:09 bug#3303: delete-frame raises old (invisible) frame David Reitter
2009-05-17 19:06 ` Stefan Monnier
2009-05-17 19:12   ` David Reitter
2009-05-17 20:43     ` Stefan Monnier
2009-05-17 22:27       ` Lennart Borgman
2009-05-18  3:26         ` Stefan Monnier
2009-05-18  1:16       ` Adrian Robert
2009-05-18  3:33         ` Stefan Monnier
2009-05-18  8:05           ` Adrian Robert
2009-05-18 15:08             ` David Reitter
2009-05-18 20:12               ` Stefan Monnier
2009-05-18 23:00                 ` David Reitter
2009-05-19  2:46                   ` Stefan Monnier
2009-05-19  2:56                     ` David Reitter
2009-05-19  3:09                       ` Stefan Monnier
2009-05-19  3:15                         ` David Reitter
2009-05-19  8:20                       ` YAMAMOTO Mitsuharu
2009-05-19 14:30                         ` Stefan Monnier
2009-05-20  2:07                       ` David Reitter [this message]
2009-05-19  0:58               ` YAMAMOTO Mitsuharu
2009-05-18  8:19           ` YAMAMOTO Mitsuharu
  -- strict thread matches above, loose matches on Subject: below --
2009-05-16 19:28 Chong Yidong
2009-05-17  2:55 ` David Reitter
2009-05-22  3:57 David Reitter
2009-05-25 15:17 ` Stefan Monnier
2009-05-26 18:20   ` David Reitter
2009-05-26 19:37     ` Stefan Monnier
2009-05-26 20:15       ` David Reitter
2009-05-26 21:30         ` Stefan Monnier
2009-05-27  4:51     ` Adrian Robert
2009-05-27 14:36       ` Stefan Monnier
2009-06-01  9:37         ` Adrian Robert
2009-05-27 15:28       ` David Reitter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B4093C5B-E9C3-43C8-B6B3-744CDD785596@gmail.com \
    --to=david.reitter@gmail.com \
    --cc=3303@emacsbugs.donarmstrong.com \
    --cc=adrian.b.robert@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).