Subject: Re: delete-frame raises old (invisible) frame

From: Stefan Monnier <[email-masked]>
Date: Tue, 26 May 2009 15:37:12 -0400

>>> PS.: I agree with the proposed change to after-make-frame-functions (not
>>> selecting the frame immediately), but this doesn't relate to the  bug at
>>> hand.  Also, I don't know why the modeline isn't updated.
>> Agreed, this is a separate problem.
> OK, are you keeping track of it, should we file another bug report to do so?

Please make another bug report for it.

>>> frame.c:
>>> Fraise_frame: do not make invisible frames visible (Stefan Monnier).
>> This is not OK for 23.1.  It might be good to try it for 23.2.
>> Also I think your other changes should make it unnecessary for the
>> problem we're trying to fix.
> As above.

I intend to install it myself for Emacs-23.2.  No need for a bug report
for that, I think.

>>> drawRect: do not set visibility/iconified flags because drawRect may be
>>> called by NSView even if the frame is hidden.
>> Do you happen to know why/when NSView might be called even for a frame
>> that's not visible?
> Unfortunately not, but invisibility does not guarantee absence of drawRect
> messages unless this is promised somewhere in the NS API.
> I do think that my patch here is right, though, as other ports set
> visibility in more obvious places.

Yes, the patch looks OK, but I'd still like to know why drawRect gets
called in such cases, as well as why the visibility settings were
modified in that routine.

> Perhaps we should make sure that we don't get a lot of drawRect calls for
> totally obscured frames, which would possibly be a performance-eater.

Indeed.

        Stefan