Subject: Re: bug#69525: 30.0.50; MacOS: New warnings on stderr

From: Gerd Möllmann <[email-masked]>
Date: Tue, 05 Mar 2024 05:38:26 +0100

Alan Third <[email-masked]> writes:

>> Found out how to reproduce this with emacs -Q. In scratch, eval
>> 
>>   (make-frame (list (cons 'parent-frame (selected-frame))
>> 		    (cons 'no-accept-focus t)))
>> 
>> This looks to me like some function in ELPA package consult uses
>> no-accept-focus t, so that nsterm.m returns NO from canBecomeKeyWindow.
>> Consult with posframe seems to work anyway, so...
>
> We should be able to create a frame without the system throwing out
> errors, though. 

True.

> I wonder if this is something we're doing (like makeKeyAndOrderFront
> being called on the new frame and it not checking canBecomeKeyWindow)
> or if there's some other step we need to take to prevent this. I'm
> fairly sure that I've never seen these warnings so presumably they're
> new since 10.14.

You are thinking of this in nsterm.m?

  - (void)makeKeyAndOrderFront:(id)sender
  {
    NSTRACE ("[EmacsWindow makeKeyAndOrderFront:]");

    if ([self parentWindow])
      {
        [self orderFront:sender];
        [self makeKeyWindow];
      }
    else
      [super makeKeyAndOrderFront:sender];
  }