emacs-devel
[Top][All Lists]
Advanced

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

Re: UI input unresponsive on macOS


From: Alan Third
Subject: Re: UI input unresponsive on macOS
Date: Fri, 17 Nov 2017 17:42:26 +0000
User-agent: Mutt/1.9.1 (2017-09-22)

On Fri, Nov 17, 2017 at 03:53:56PM +0200, Eli Zaretskii wrote:
> > Date: Thu, 16 Nov 2017 19:33:43 +0000
> > From: Alan Third <address@hidden>
> > Cc: Gong-Yi Liao 廖宮毅 <address@hidden>,
> >     Eli Zaretskii <address@hidden>, address@hidden,
> >     address@hidden
> > 
> > > (make-thread
> > >  (lambda ()
> > >    (let (last-nonmenu-event)
> > >      (setq test (y-or-n-p-with-timeout "test" 2 'timeout)))))
> > > 
> > > Athena: Works.
> > > GTK+2: Timeout works, but buttons are not displayed.
> > > GTK+3: Hangs.
> > > NS: Crashes.
> > 
> > I’m not sure how we could handle that on NS. Perhaps just refuse to
> > display the dialogue at all, and return nil?
> 
> If you can detect this situation, it's possible.  But silently
> returning nil might not be a good idea, as it's hard to distinguish
> that from normal return.  How about displaying a warning?  (You cannot
> easily error out in a thread, so that's not a good option.)

NS GUI elements need to be handled in the main thread and it’s easy
enough to check whether we’re in the main thread before trying to
display the dialogue box. It’s also possible we could pass the request
for the dialogue box over to the main thread, but I don’t know how to
deal with return values and so on.

Displaying a warning seems like the best option. Thanks.
-- 
Alan Third



reply via email to

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