Commit Graph

60 Commits

Author SHA1 Message Date
George Peter Staplin 811e9f5e9e XQuartz: pbproxy: Use an NSBitmapImageRep to convert an "image/png" selection
to a TIFFRepresentation for use with NSPasteboard.

This has been tested with the Gimp and works with some minor quartz-wm changes.
The Finder clipboard shows the image updates after an Edit -> Copy.
(cherry picked from commit 12912adaeea759d30f96d8ae51a84fd1659ea0ac)
2008-09-21 17:40:16 -07:00
George Peter Staplin 23ec8261b6 XQuartz: pbproxy: The greedy CLIPBOARD handling now works for text.
This change adds some [self own_clipboard] calls in the necessary places to get the proper greedy behavior.

UTF8_STRING and STRING properties seem to work well now with the test cases (PRIMARY, and CLIPBOARD).  I can copy from several different X apps, and have the behavior be correct when pasting.  I also verified that quartz-wm isn't doing the copying, by disabling the quartz-wm paths.
(cherry picked from commit 934669f732c28f07b9d934d8f8f0b63ccfebd900)
2008-09-21 17:40:15 -07:00
George Peter Staplin 7c2eb3d41a XQuartz: pbproxy: return the TARGETS list as a 32-bit list to fix a bug that was in the original.
Add TRACE() calls where appropriate to try to figure out why we are losing CLIPBOARD at times, after transferring PRIMARY to the NSPasteboard.

Use the new pbproxy_clipboard_to_pasteboard where appropriate.
(cherry picked from commit 40190675a6c1889cca3574e5d1a9c16ab74315a7)
2008-09-21 17:40:15 -07:00
George Peter Staplin 81c836902d Rename reclaim_clipboard to claim_clipboard.
Convert the puts usage to use DB().

Add the initial handle_image method.

Check for nil in the NSString instantiation in various places.

Add some commentary to enhance the clarity of why I did some things.
(cherry picked from commit 37361567b65241eab64e8b30cd9729d0e71a86d2)
2008-09-21 17:40:15 -07:00
George Peter Staplin 85e23affea Add an image_jpeg Atom.
(cherry picked from commit ea9dc27977c5eab666f2aa2d914e4e28d36758c7)
2008-09-21 17:40:15 -07:00
George Peter Staplin 6b42f40ff9 Rename reclaim_clipboard to claim_clipboard.
(cherry picked from commit d333a8e2b5514b8b76a78c6a13a3f5149ea8de27)
2008-09-21 17:40:15 -07:00
George Peter Staplin 2ab56981b1 Add image/jpeg type, and rename reclaim_clipboard to claim_clipboard.
(cherry picked from commit 32b175ef62b68a971784e51e937e358cb10e20ac)
2008-09-21 17:40:14 -07:00
Jeremy Huddleston cbd32645f7 XQuartz: pbproxy: Added global variables to customize how pbproxy behaves
(cherry picked from commit 21a2d0b8d03faf1c66ec0c5c11fbd2ab24547727)
2008-09-21 17:40:14 -07:00
Jeremy Huddleston 5b397642cd XQuartz: pbproxy: First round of updates to pbproxy from George.
(cherry picked from commit 5c8b956f8f3f17e8d577d97cb66424954be72684)
2008-09-21 17:40:14 -07:00
Jeremy Huddleston 1669308be6 XQuartz: Added pasteboard proxy code stripped out of quartz-wm.
(cherry picked from commit 1f842c71c35db031a24de646429834d6054adf1d)
(cherry picked from commit 144746223d8dc3f6ff2a0e805aa27a6e57df558a)
2008-09-03 09:33:58 -07:00