Subject: bug#3302: Frame deletion with 'force fails

From: Stefan Monnier <[email-masked]>
Date: Sun, 17 May 2009 23:51:16 -0400

> After all, the menu bar may still be visible (doesn't need a frame).

Oh, I see.  Yes, under NS it might make sense.

> I looked some more at the code (mainly by enabling frame deletion in this
> case), and because we expect there to be a selected frame pretty much at
> all times, I don't think this can be fixed.  (But I would hope I'm wrong.)

It's easy to fix: just provide some special frame for it (one that
isn't displayed).

> Does Emacs in daemon mode run with a special event loop?

No.  But it has a special terminal (to a large extent, the same as used
for --batch mode), so it does have a "selected-frame".

> I'd be happy for this to be closed as a "wontfix" bug, or if the
> delete-frame doc string was improved.

I'm not opposed to installing NS-specific changes to address this
problem, but they will need to be made elsewhere since, as you've
noticed, too much of the code relies on the existence of
a selected-frame.

        Stefan