On Sun, 26 Sept 2021 at 03:41, Mark Geisert <m...@maxrnd.com> wrote: > > Hi Takashi, > > > > > Currently, putclip calls OpenClipboard()/CloseClipboard() four > > times. Is there any reason why closing and reopening clipboard > > several times? > > I don't know why the author coded putclip that way. Perhaps Windows required > different clipboard interfacing long ago? Or the author was being very > cautious? > > > Is there any problem if you open clipboard once and close it at > > the end of function int putclip() just like the patch attached? > > > > The problem above disappears if the patch is applied.
Does the code save the clipping to the clipboard with multiple formats? e.g. an ascii format, a utf-9 and a utf-16 or even an html version? I Don't recall how you had to code the clip operation so the paster can choose the best format to paste. I think mintty does this so that a text editor can paste the text from the screen, but a html editor can paste the maked-up text with bolding, underlines, etc. If you have turned on "Clipboard history" and/or "Sync across devices" in the Clipboard Settings, in at least some versions of Windows 10, there is an internet round trip to a Microsoft server that causes a delay between the copy-to-clipboard operation and when that clip is available for a paste-from-clipboard operation. If you perform a Ctrl-C immediately followed by a Ctrl-V, i.e., before the round trip completes, you will paste the previous clipboard contents instead of the expected new content. HTH Doug -- Doug Henderson, Calgary, Alberta, Canada - from gmail.com -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple