emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should this package be included into the NS port?


From: Alan Third
Subject: Re: Should this package be included into the NS port?
Date: Fri, 18 May 2018 20:36:32 +0100
User-agent: Mutt/1.9.3 (2018-01-21)

On Tue, May 15, 2018 at 10:48:20PM -0400, George Plymale II wrote:
> Alan Third <address@hidden> writes:
> 
> > It might be worth investigating exactly why the NS port can’t open a
> > new frame in this situation, but I’ve not got round to it yet. It
> > seems rather strange to me.
> 
> Yes, I agree. I would also very much like to know the cause of this bug,
> but alas I'm a bit strapped for time as well. I've done some casual,
> fruitless experimentation with it in the past yet I've gotten no closer
> to the cause. If anyone would be willing to take up the torch for this
> and do some detective work, that would be awesome.

I’ve had a dig around and it looks as though emacsclient is able to
open a new GUI frame, so it’s not quite as dire as I’d previously
thought.

There are two problems, though.

* Application Menu

When the last NS frame is deleted the menus aren’t updated, so I think
they’ll be the menus as defined for the last frame. They should
probably be cut right back to just the ‘Emacs’ menu, and perhaps
‘help’.

(NOTE: The menus are a bit of a mess, Nick Helm and I have been
discussing them in bug#31371.)

* Dock Menu

This has a ‘new frame’ option but just plain doesn’t work. I think the
problem is the way it’s trying to create a new frame:

    - (void)newFrame: (id)sender
    {
      NSTRACE ("[EmacsApp newFrame:]");
    
      struct frame *emacsframe = SELECTED_FRAME ();
      NSEvent *theEvent = [NSApp currentEvent];
    
      if (!emacs_event)
        return;
      emacs_event->kind = NS_NONKEY_EVENT;
      emacs_event->code = KEY_NS_NEW_FRAME;
      emacs_event->modifiers = 0;
      EV_TRAILER (theEvent);
    }

This seems to rely on there being an existing NS frame, but we’ve
deleted the last one. I assume if we were clever we’d be able to use
the, still open, terminal frame.

Is there some other way of creating a new GUI frame? I assume there
must be since emacsclient can do it.

* ALSO!

Closing the terminal frame when there are no GUI frames left results
in a crash. I guess Emacs doesn’t think it needs to clean up the NS
stuff or something? I don’t really know what’s going on there.
-- 
Alan Third



reply via email to

[Prev in Thread] Current Thread [Next in Thread]