emacs-devel
[Top][All Lists]
Advanced

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

Re: master 2021835326 2/3: Implement `return-frame' for DND on NS


From: YAMAMOTO Mitsuharu
Subject: Re: master 2021835326 2/3: Implement `return-frame' for DND on NS
Date: Thu, 26 Jan 2023 20:29:39 +0900
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (Goj┼Ź) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

On Tue, 31 May 2022 22:07:23 +0900,
Po Lu wrote:
> 
> > +  /* FIXME: there must be a better way to leave the event loop.  */
> > +  [NSException raise: @""
> > +         format: @"Must return DND frame"];
> > +}
> > +#endif
> 
> This works (and there's nothing in the documentation forbidding it), but
> prints an ugly warning message to stdout every time the exception is
> raised.  Does anyone know of a better way to stop an NS drag-and-drop
> operation inside one of the drag source callbacks?

Posting ESC KeyDown event seems to work, as long as I tested with
Emacs 29-based Mac port (in development).

BTW, I think safe_call/redisplay in -[EmacsView draggingUpdated:] is
unsafe in some situations.  This method is called from the main thread
in the context of `select' emulation if the dragging is originated
from another application.  Because `thread_select' may cause thread
switching if we have multiple Lisp threads, Lisp evaluation in another
thread might be in progress while the main thread is waiting for the
completion of the `select' emulation.

                                     YAMAMOTO Mitsuharu
                                mituharu@math.s.chiba-u.ac.jp



reply via email to

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