Re: [Xquartz-dev] 1.4.2-apple20 - copy-paste
On the topic of copy-paste, I want to give an update for the latest betas on my system. I can copy and paste both directions between Textedit and xterm. I can copy and paste both directions with X11-Gimp and Preview. I continue to have unusual copy-paste behavior between X11-Gimp and Adobe Photoshop, Results are the same as I described from the previous version. I can copy from Gimp to Photoshop, but not the other way. I can copy from Photoshop to Preview fine and Preview to Gimp fine. I continue to have unusual copy-paste behavior between X11-Eterm and anything othe than Eterm. Results are the same as I described from the previous version. Seems like they use different buffers. Under Linux I use a mix of xterm and Eterm and never saw this problem. Let me know if there's any info I can collect that could be useful. Dave
Quoted Dave Ray <apple@jonive.com>:
On the topic of copy-paste, I want to give an update for the latest betas on my system.
I can copy and paste both directions between Textedit and xterm. I can copy and paste both directions with X11-Gimp and Preview.
I continue to have unusual copy-paste behavior between X11-Gimp and Adobe Photoshop, Results are the same as I described from the previous version. I can copy from Gimp to Photoshop, but not the other way. I can copy from Photoshop to Preview fine and Preview to Gimp fine.
Well, that's interesting that it's still not working between Photoshop and Gimp. I don't have Photoshop available to test with. I suspect that Photoshop is using a Pict format with NSPasteboard, but I have no way of knowing for sure, unless I can add some introspection for the available types. I will look into this further, and perhaps write a test application for you that would print out the available NSPasteboard types. I want it to work flawlessly between all apps, as much as possible. Right now we support TIFF, JPEG, PNG, UTF-8, CompoundText, and STRING/Latin-1. The Pict support was more difficult I think, because I'm not sure how to translate between the Pict and the various formats. We need to convert Pict to TIFF, and Pict to PNG for the best results.
I continue to have unusual copy-paste behavior between X11-Eterm and anything othe than Eterm. Results are the same as I described from the previous version. Seems like they use different buffers. Under Linux I use a mix of xterm and Eterm and never saw this problem.
I have this on the TODO list on my desk. I'm sorry that it's taking a while to get to. I will try to take a look at the Eterm sources, as I suspect they are doing something unexpected.
Let me know if there's any info I can collect that could be useful. Dave
If I can think of anything, I will let you know. Once I've written the code for NSPasteboard introspection we should be able to get a little further on one of these issues. I appreciate your feedback. George -- http://people.freedesktop.org/~gstaplin/
On Oct 26, 2008, at 07:53, George Peter Staplin wrote: ...
Well, that's interesting that it's still not working between Photoshop and Gimp. I don't have Photoshop available to test with.
I suspect that Photoshop is using a Pict format with NSPasteboard, but I have no way of knowing for sure, unless I can add some introspection for the available types. I will look into this further, and perhaps write a test application for you that would print out the available NSPasteboard types. I want it to work flawlessly between all apps, as much as possible.
Right now we support TIFF, JPEG, PNG, UTF-8, CompoundText, and STRING/Latin-1.
Yeah, this is a good start (and much better than what we had before ;>) ...
The Pict support was more difficult I think, because I'm not sure how to translate between the Pict and the various formats. We need to convert Pict to TIFF, and Pict to PNG for the best results.
Yeah, currently we just drop it if it's Pict... It could also be something else that we don't handle... is there documentation somewhere about what valid types can be returned by [NSPasteboard types]?
I have this on the TODO list on my desk. I'm sorry that it's taking a while to get to. I will try to take a look at the Eterm sources, as I suspect they are doing something unexpected.
Same goes for nedit (and I suspect other apps that use the Motif clipboard functionality)...
On 26 Oct 08, at 10:21, Jeremy Huddleston wrote:
It could also be something else that we don't handle... is there documentation somewhere about what valid types can be returned by [NSPasteboard types]?
There's no explicit limits on what you can put on the pasteboard - a lot of programs use private types to get special copy/paste semantics within the app. (Doubly so for DnD.) As for what types are publicly documented, there are a bunch of constants in the NSPasteboard ref, and there may be more undocumented common types you can see with the Clipboard Viewer example app.
Quoted Jeremy Huddleston <jeremyhu@apple.com>:
On Oct 26, 2008, at 07:53, George Peter Staplin wrote:
...
Well, that's interesting that it's still not working between Photoshop and Gimp. I don't have Photoshop available to test with.
I suspect that Photoshop is using a Pict format with NSPasteboard, but I have no way of knowing for sure, unless I can add some introspection for the available types. I will look into this further, and perhaps write a test application for you that would print out the available NSPasteboard types. I want it to work flawlessly between all apps, as much as possible.
Right now we support TIFF, JPEG, PNG, UTF-8, CompoundText, and STRING/Latin-1.
Yeah, this is a good start (and much better than what we had before ;>) ...
Agreed :-)
The Pict support was more difficult I think, because I'm not sure how to translate between the Pict and the various formats. We need to convert Pict to TIFF, and Pict to PNG for the best results.
Yeah, currently we just drop it if it's Pict...
It could also be something else that we don't handle... is there documentation somewhere about what valid types can be returned by [NSPasteboard types]?
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Clas... It should be possible to build an app that uses the NSPasteboard using something like this: NSArray *array = [pb types]; NSUInteger i; for(i = 0; i < [array count]; ++i) { NSString *typestr = [array objectAtIndex: i]; if([typestr isEqualToString: NSPICTPboardType]) { puts("PICT"); } ... } Depending on how the NSString is defined in NSPasteboard.h for NSPICTPboardtype, we might be able to just print the typestr itself, and have it make sense.
I have this on the TODO list on my desk. I'm sorry that it's taking a while to get to. I will try to take a look at the Eterm sources, as I suspect they are doing something unexpected.
Same goes for nedit (and I suspect other apps that use the Motif clipboard functionality)...
Thanks for reminding me. I'll increase the priority of this. George -- http://www.xmission.com/~georgeps/ http://whim.linuxsys.net http://code.google.com/p/megapkg/ http://people.freedesktop.org/~gstaplin/
Quoted George Peter Staplin <georgeps@xmission.com>:
Quoted Jeremy Huddleston <jeremyhu@apple.com>:
On Oct 26, 2008, at 07:53, George Peter Staplin wrote:
...
Well, that's interesting that it's still not working between Photoshop and Gimp. I don't have Photoshop available to test with.
The Pict support was more difficult I think, because I'm not sure how to translate between the Pict and the various formats. We need to convert Pict to TIFF, and Pict to PNG for the best results.
Yeah, currently we just drop it if it's Pict...
It could also be something else that we don't handle... is there documentation somewhere about what valid types can be returned by [NSPasteboard types]?
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Clas...
It should be possible to build an app that uses the NSPasteboard using something like this: [snip]
I have attached a compiled test app that should tell you what types Photoshop is providing. I also attached the source code to the app. You can decompress the .bz2 file with bunzip2 or bzip2 -d. $ gcc NSPasteboard_types.m -Wall -framework AppKit -framework Foundation -arch i386 -arch ppc -o NSPasteboard_types $ file NSPasteboard_types NSPasteboard_types: Mach-O universal binary with 2 architectures NSPasteboard_types (for architecture i386): Mach-O executable i386 NSPasteboard_types (for architecture ppc7400): Mach-O executable ppc This is what it looks like after having done an Edit->Copy in the Gimp's window. I think that the NSPasteboard transparently happens to provide PICT in this case, since we set a TIFF. $ ./NSPasteboard_types type public.tiff type NeXT TIFF v4.0 pasteboard type type com.apple.pict type Apple PICT pasteboard type Please tell what it reports after you have done a Photoshop Edit->Copy. In fact, anyone that is having trouble pasting from a Mac app to an X11 app should give it a try, and send us the results. Thanks, George -- http://people.freedesktop.org/~gstaplin/
participants (4)
-
Andrew Farmer
-
Dave Ray
-
George Peter Staplin
-
Jeremy Huddleston