public inbox for cygwin-developers@cygwin.com
 help / color / mirror / Atom feed
* Re: [PATCH] Cygwin: Make native clipboard layout same for 32- and 64-bit
       [not found]               ` <12fea3e3-92ae-2a33-81ea-808bdcc20f2a@maxrnd.com>
@ 2021-10-27  9:01                 ` Thomas Wolff
  2021-10-27  9:52                   ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Wolff @ 2021-10-27  9:01 UTC (permalink / raw)
  To: cygwin-developers



Am 23.10.2021 um 07:35 schrieb Mark Geisert:
> Hi all,
>
> Corinna Vinschen wrote:
>> On Oct 11 08:11, Ken Brown wrote:
>>> On 10/11/2021 2:13 AM, Mark Geisert wrote:
>>>> It's just that after submitting the patch I realized that, if we 
>>>> really
>>>> are going to support both Cygwin archs (x86_64 and i686), there is 
>>>> still
>>>> the issue of different cygcb_t layouts between Cygwin versions being
>>>> ignored.
>>>>
>>>> Specifically, the fhandler_clipboard::fstat routine can't tell which
>>>> Cygwin environment has set the clipboard contents.  My original patch
>>>> takes care of 32-bit and 64-bit, providing both are running Cygwin >=
>>>> 3.3.0 (presumably).  What if it was a different version (pre 3.3.0) 
>>>> that
>>>> set the contents?
>>>
>>> I wonder if this is worth the trouble.  Right now we have a problem 
>>> in which
>>> data written to /dev/clipboard in one arch can't be read in the 
>>> other arch.
>>> The fix will appear in Cygwin 3.3.0.  Do we really have to try to 
>>> make the
>>> fix apply retroactively in case the user updates one arch but not 
>>> the other?
>>
>> Just to close this up prior to the 3.3.0 release...
>>
>> Given we never actually strived for 32<->64 bit interoperability, it's
>> hard to argue why this should be different for the clipboard stuff.
>>
>> Running 32 and 64 bit Cygwin versions in parallel doesn't actually make
>> much sense for most people anyway, unless they explicitely develop for
>> 32 and 64 bit systems under Cygwin.  From a productivity point of view
>> there's no good reason to run more than one arch.
>>
>> So I agree with Ken here.  It's probably not worth the trouble.
>
> Sorry, I've been sidetracked for a bit.  I can agree with Ken too.  
> The only circumstance I could think of where multiple internal format 
> support might be useful (to non-developers) was some user hanging on 
> to an older Cygwin because it was needed to support something else 
> (s/w or h/w) old and non-upgradeable. Doesn't seem very likely at this 
> point.
>
> 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.
Thanks for considering
Thomas

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Cygwin: Make native clipboard layout same for 32- and 64-bit
  2021-10-27  9:01                 ` [PATCH] Cygwin: Make native clipboard layout same for 32- and 64-bit Thomas Wolff
@ 2021-10-27  9:52                   ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2021-10-27  9:52 UTC (permalink / raw)
  To: cygwin-developers

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.


Corinna

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-27  9:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20211007052237.7139-1-mark@maxrnd.com>
     [not found] ` <20211008185210.cac713f28dea727a1467cf94@nifty.ne.jp>
     [not found]   ` <29514de9-0d19-0d22-b8e1-3bfbce11589b@cornell.edu>
     [not found]     ` <7dd31f61-43a1-4e4d-2e1a-dc79606263d5@dronecode.org.uk>
     [not found]       ` <037a8027-8969-df1e-ccb5-6a736578cec5@cornell.edu>
     [not found]         ` <6de24f8c-bd21-cd4f-18ff-ece3fef85b89@maxrnd.com>
     [not found]           ` <ee8b46bd-f8f4-85da-be25-233c3cb60c71@cornell.edu>
     [not found]             ` <YXLUkU6Nc3qAXLyp@calimero.vinschen.de>
     [not found]               ` <12fea3e3-92ae-2a33-81ea-808bdcc20f2a@maxrnd.com>
2021-10-27  9:01                 ` [PATCH] Cygwin: Make native clipboard layout same for 32- and 64-bit Thomas Wolff
2021-10-27  9:52                   ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).