[PATCH] Cygwin: Make native clipboard layout same for 32- and 64-bit

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Oct 27 09:52:10 GMT 2021

On Oct 27 11:01, Thomas Wolff wrote:
> Am 23.10.2021 um 07:35 schrieb Mark Geisert:
> > [...]
> > I'll try to get the v2 patch out over this weekend.  Same end-result for
> > same environments as the v1 patch, but incorporating all the comments I
> > received.
> > 
> > To that end, does Jon's suggestion of /usr/include/sys/cygwin.h seem
> > like the best location to define struct cygcb_t for use by both Cygwin
> > and cygutils package?
> > Thanks much,
> > 
> > ..mark
> Mintty uses the Windows clipboard directly, so it does not face this problem
> so far. However, that results in a timestamp of 1st Dec 2006 for
> /dev/clipboard. In order to avoid a complete reimplementation of mintty
> clipboard handling ("never touch a running system"), would it be possible to
> set the cygwin timestamp only, without affecting the clipboard contents,
> maybe using a new cygwin API function? Like `touch /dev/clipboard` which
> does not work however.

The timestamp is only stored in the clipboard itself.  I don't see any other
way than to store the data twice, once in windows and once in Cygwin format.
What you could do is to wait for Cygwin 3.3.0, then you can include
<sys/clipboard.h> and just store the data additionally in Cygwin format
with timestamp.

However, is the clipboard timestamp really that important?  It sounds
fun, but as soon as *any* non-Cygwin application implemants a copy to
clipboard, the timestamp of /dev/clipboard is reset to 2006.


More information about the Cygwin-developers mailing list