Subject: bug#3468: drag and drop text

From: Eli Zaretskii <[email-masked]>
Date: Sun, 29 Sep 2024 14:36:38 +0300

> Date: Sun, 29 Sep 2024 13:17:26 +0200
> Cc: [email-masked]
> From: Cecilio Pardo <[email-masked]>
> 
> On 29/09/2024 9:19, Eli Zaretskii wrote:
> 
> >> +  if (files->fWide)
> > 
> > What determines whether we get "wide" file names or ANSI file names?
> > We want to get "wide" file names where possible, but I don't see where
> > we request that?
> 
> We can't request it, I suppose it depends on the OS version or the 
> program sending the drop.

What did you see on Windows 11?  Do we always receive "wide" file
names?  Did you try dragging file names whose characters are not
supported by the current ANSI codepage, and if so, did it work?

> > If this runs in a non-main thread, then we cannot do this: calling
> > functions that manipulate Lisp data in non-main threads is a no-no.
> > Can we instead delegate the actual processing to where
> > WM_EMACS_DROPSTRING is processed?  If not, why not?
> 
> It runs indeed on the "shell thread". I'll move all the processing to 
> the message handler.

Thanks.  By "message handler" you mean w32_read_socket, yes?

> Thanks a lot for your review, and sorry for all the style mistakes.

No need to apologize, it takes time to learn the subtleties of our
conventions.