Re: If you were writing a Windows and X clipboard integration manager...
Andrew, Thanks for responding. Yes, there are at least 3 clipboard/cut-buffer mechanisms. We originally set out to watch for CUT_BUFFER0 to change, at which point we would copy it to the Windows clipboard. That seemed fine, except that non-U.S. users screamed bloody murder because CUT_BUFFERs do not let you get non ascii/latin1 encoded text. Also, some users claim that not all X applications paste data to CUT_BUFFER0. Thus, we changed to grabbing ownership of CLIPBOARD at startup. Then, when any application takes ownership of CLIPBOARD, we copy their text to the Windows clipboard and reassert ownership of CLIPBOARD. Our main problem is that last step. It causes X clients to unhighlight the selected region of text. On the other hand, if we do not reassert ownership of CLIPBOARD we will never know if it has changed again. There is supposedly some mechanism for a clipboard manager that has something to do with the CLIPBOARD_MANAGER atom. I have about 4 books and countless PDFs (including the ICCM) on X and I have read and reread what all of them have to say about the clipboard, and non of them tells you how to use CLIPBOARD_MANAGER. I came up with the idea that we could continue to copy text from the CLIPBOARD atom, but instead of reasserting ownership we could simply watch CUT_BUFFER0 for changes and copy from CLIPBOARD when CUT_BUFFER0 changes. People told me that this was not a good idea because not all applications touch CUT_BUFFER0 when they highlight or copy text. Could someone that has seen a lot of X applications tell me if watching CUT_BUFFER0 will work for 99% of X applications... because if it does it will certainly be better than our current solution of not working correctly with 100% of X applications. Thanks again for your input, Harold Dr Andrew C Aitchison wrote: On Thu, 30 Jan 2003, Harold L Hunt II wrote: ...how would you do it, in 150 words or less? Seriously, I have been working on this for over a year and I would love to hear some of the ideas that people have because I am completely stumped on how to make such a clipboard manager work properly. I'd be completely lost describing it in 150 words just for X. IIRC there are at least 3 clipboard/cut-buffer mechansims (no I can't remember them all). xprop -root lists 8 CUT_BUFFERX strings (and an atom called _MOTIF_CLIP_FORMAT_ACROBAT_SELECTION) There are about 5 (OK maybe only 3) ways of indicating a clipboard string in a non ascii/latin1 encoding, some of which can't be used by clients in different locales. Throw in MS Windows, and I'd be unhappy unless you can preserve the ability of X to mark in one window and paste in another, using only the mouse. I doubt I'd consider a windowing system without it, at least one based on keyboard+mouse, or even a stylus. ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
Re: If you were writing a Windows and X clipboard integration manager...
Harold L Hunt II [EMAIL PROTECTED] writes: ...how would you do it, in 150 words or less? Seriously, I have been working on this for over a year and I would love to hear some of the ideas that people have because I am completely stumped on how to make such a clipboard manager work properly. You really want a server extension (or you could do it in the server, but that would prevent you from using existing client code to retrieve the clipboard contents ... a non-trivial task.) See discussion from: https://listman.redhat.com/pipermail/xdg-list/2002-November/000881.html The extension discussed there will *not* be part of XFree86-4.3, but is the right way of doing it and likely will make it in at some future point. It would be nice if someone responded this time... [ Hint, demanding a response is a really good way to discourage people from responding ] Regard,s Owen ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
Re: If you were writing a Windows and X clipboard integration manager...
Owen, Owen Taylor wrote: Harold L Hunt II [EMAIL PROTECTED] writes: ...how would you do it, in 150 words or less? Seriously, I have been working on this for over a year and I would love to hear some of the ideas that people have because I am completely stumped on how to make such a clipboard manager work properly. You really want a server extension (or you could do it in the server, but that would prevent you from using existing client code to retrieve the clipboard contents ... a non-trivial task.) Ah ha! Now there is a new idea that I had not thought of yet. This could be promising. Are you saying that I could write a server extension that only Cygwin/XFree86 uses and that such an extension would give me access to the internals that I need? Or, are you saying that there needs to be a new generic server extension that all clients need to support in order for us to play nicely with them? See discussion from: https://listman.redhat.com/pipermail/xdg-list/2002-November/000881.html The extension discussed there will *not* be part of XFree86-4.3, but is the right way of doing it and likely will make it in at some future point. Very interesting. I will read up on that. It would be nice if someone responded this time... [ Hint, demanding a response is a really good way to discourage people from responding ] Of course. You'll notice in my first message that I did not make such an observeration. I got precisely 0 responses. This time I made that observation and I have gotten 2 extremely helpful replies. Sounds like your hint doesn't hold up :) You also have to understand that over the past two years, or so, I have probably written 8 new emails to this mailing list, of which 4 or more were completely ignored. That doesn't really seem very polite to me, since I only write to this mailing list after I have spent several months searching for an answer on my own. So yeah, you could call me frustrated :) Thanks again for your response, Harold Hunt Regard,s Owen ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
Re: If you were writing a Windows and X clipboard integration manager...
- Original Message - From: Owen Taylor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 30, 2003 12:30 PM Subject: Re: If you were writing a Windows and X clipboard integration manager... Harold L Hunt II [EMAIL PROTECTED] writes: ...how would you do it, in 150 words or less? Seriously, I have been working on this for over a year and I would love to hear some of the ideas that people have because I am completely stumped on how to make such a clipboard manager work properly. You really want a server extension (or you could do it in the server, but that would prevent you from using existing client code to retrieve the clipboard contents ... a non-trivial task.) See discussion from: https://listman.redhat.com/pipermail/xdg-list/2002-November/000881.html The extension discussed there will *not* be part of XFree86-4.3, but is the right way of doing it and likely will make it in at some future point. It would be nice if someone responded this time... [ Hint, demanding a response is a really good way to discourage people from responding ] Regard,s Owen Dunno about that Owen. Seems he got a few;-) And one is a real lead. I think it's a good method. Georgina ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
Re: If you were writing a Windows and X clipboard integration manager...
Harold L Hunt II [EMAIL PROTECTED] writes: Owen, Owen Taylor wrote: Harold L Hunt II [EMAIL PROTECTED] writes: ...how would you do it, in 150 words or less? Seriously, I have been working on this for over a year and I would love to hear some of the ideas that people have because I am completely stumped on how to make such a clipboard manager work properly. You really want a server extension (or you could do it in the server, but that would prevent you from using existing client code to retrieve the clipboard contents ... a non-trivial task.) Ah ha! Now there is a new idea that I had not thought of yet. This could be promising. Are you saying that I could write a server extension that only Cygwin/XFree86 uses and that such an extension would give me access to the internals that I need? Or, are you saying that there needs to be a new generic server extension that all clients need to support in order for us to play nicely with them? There is no need for clients to use the extension, just the clipboard manager program. The thread on xdg-list has the details. Regards, Owen ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel