Commit Graph

5400 Commits

Author SHA1 Message Date
Jeremy Huddleston
1f205c6e00 Partially reverts commit 207ba1783b.
git-cherrypick nuked fbwindow.c, so here it is back
2008-10-03 11:25:53 -07:00
George Peter Staplin
901c75722c XQuartz: pbproxy: Possibly fix a memory leak by using an [NSApp run] loop,
instead of calling CFRunLoopRun() directly.  The leak wasn't reproducible on
this machine, but someone was able to produce a leak trace with Instruments
that indicates it was leaking in the CFRunLoopRun() path.

x-input.m: dequeue and ignore events when pbproxy_active is false.

x-selection.h: add an is_active method that is used by x-input.m to ignore
events.

x-selection.m: Handle nearly every preference, except for primary_on_grab,
which I don't really understand yet.
(cherry picked from commit 4d51ad851e)
2008-10-03 11:14:18 -07:00
Jeremy Huddleston
459280477a XQuartz: Use "pointer" and "pen" for device names to please GDK.
(cherry picked from commit 00ca0f4d83)
2008-10-03 11:14:11 -07:00
Jeremy Huddleston
5a369fe938 XQuartz: Workaround for initial pressure/tilt being sent as 0 with motion during the proximity event
(cherry picked from commit 9a91d770a6)
2008-10-03 11:14:04 -07:00
Jeremy Huddleston
c22ac57a78 XQuartz: Using absolute ranges for pointer location to increase resolution and better support tablets.
(cherry picked from commit d79ccb45f6)
2008-10-03 11:13:59 -07:00
Jeremy Huddleston
938cf097dd XQuartz: Removed resolved comment about localization.
(cherry picked from commit 8ed5faf058)
2008-10-03 11:13:52 -07:00
George Peter Staplin
91aeabff15 XQuartz: pbproxy: Make the signal handler safer by using _exit, and only exit.
Remove some unnecesssary headers.

Remove some dead code that was never called or used in pbproxy.

Make use of an NSAutoreleasePool in x_init.  It could potentially cause a leak
on a startup without this.

Start adding reload_preferences to the x_selection class, as well as event
handling for that.
(cherry picked from commit 602e8ba8f7)
2008-10-03 11:13:44 -07:00
Jeremy Huddleston
b2d9b0d067 XQuartz: Added some localizable strings that were missing.
(cherry picked from commit 2c8205ea8b)
2008-10-03 11:13:37 -07:00
Jeremy Huddleston
c3d15e1b6d XQuartz: Actually send the pointer event from the pen even if it happes to actually have 0 pressure and 0 tilt.
(cherry picked from commit f415837619)
2008-10-03 11:10:25 -07:00
Jeremy Huddleston
95967f1f32 Xquartz: xpbproxy: Split out app-specific stuff to app-main.m in prep for making this into a thread.
(cherry picked from commit c2012138a5)
2008-10-03 11:10:15 -07:00
Jeremy Huddleston
f0b49cdc2e XQuartz: Send AppleWMReloadPreferences where appropriate.
(cherry picked from commit 490cbe9888)
2008-10-03 11:10:06 -07:00
Jeremy Huddleston
88033a66a5 XQuartz: Added a --enable-integrated-xpbproxy configure option for building xpbproxy as an app or as a thread.
(cherry picked from commit 8edc5fb38c)
2008-10-03 11:09:26 -07:00
Jeremy Huddleston
207ba1783b Added dep on applewmproto 1.1.0
(cherry picked from commit b350b06674)
2008-10-03 11:08:39 -07:00
George Peter Staplin
0e089bdbc1 XQuartz: pbproxy: Fix another STRING bug.
Fix the usage of the NSString cStringUsingEncoding: - it doesn't NUL
terminate the string, which lead to a bus error.  So, we use
lengthOfBytesUsingEncoding: to get the length in bytes instead of
strlen().
(cherry picked from commit 6333d619e7)
2008-09-26 12:30:54 -07:00
George Peter Staplin
191d6656a0 XQuartz: pbproxy: Fix a bug that rxvt brought out in STRING copying. Now I can copy and paste to/from rxvt correctly.
(cherry picked from commit 82a4dc5f0f)
2008-09-26 12:30:46 -07:00
Jeremy Huddleston
cbc9389dd3 XQuartz: Fixed threading issue with TSM.
(cherry picked from commit 93ab4e0071)
2008-09-26 12:30:36 -07:00
Jeremy Huddleston
d5db51954f XQuartz: pbproxy: Removed stray SPI include.
(cherry picked from commit 2fb2bc77b8)
2008-09-26 12:30:29 -07:00
George Peter Staplin
37f023c59f XQuartz: pbproxy: Fix 3 paths that could leak memory.
2 of the paths leaked, when INCR transfers were done.  Now we
are leak free according to the leaks program for all transfers
I have tried so far.
(cherry picked from commit aa98db576b)
2008-09-26 12:30:21 -07:00
George Peter Staplin
d1b39134cd XQuartz: pbproxy: Fix NSObject memory leaks by properly using the
NSAutoreleasePool.   Now the usage is consistent.  In x_input_run()
we create a pool, and release it after processing the XEvents.

Add some getpid() output to main for debugging.  It needs a bit more
testing before the next release.

Don't retain the NSPasteboard as the old code did.  That may have
contributed to the leak, and it made it so that we needed the
NSAutoreleasePool created in main().

Remove the _known_types, and _pasteboard instance variables from
the x_selection class.  They aren't needed anymore.

The leaks program now indicates 0 leaks after some usage.  I want
to test further, but this seems much better, and my memory usage
graph indicates it's not growing.
(cherry picked from commit b245d84a72)
2008-09-26 12:30:10 -07:00
George Peter Staplin
5d7506c52a XQuartz: pbproxy: Add a comment to pbproxy.h about how the DB()
macro causes a leak (according to the leaks program).

Attempt to fix several other leaks with release method calls.
For some reason the process still grows more than it should...

I will need to use some better methods than leaks, and malloc_history
I suspect.  Whatever is leaking, it's hard to find.  I need to isolate
the cases more.

Add a missing image/jpeg branch.

Remove read_prop_32 - it's not used.
(cherry picked from commit 63a680354d)
2008-09-26 12:29:58 -07:00
Jeremy Huddleston
86fa42ed82 Merge branch 'server-1.5-branch' into xorg-server-1.5-apple 2008-09-26 12:29:44 -07:00
Alan Hourihane
af8cef461c only build dri2 when DRI2 is enabled 2008-09-24 14:24:36 +01:00
Adam Jackson
97f688f2b4 xserver 1.5.1 2008-09-23 14:51:33 -04:00
Adam Jackson
68c575cb73 Move RELEASE_DATE below AC_INIT.
Doing it the other way around clobbers the setting, which means you get
a null release date string in the log.  Thanks autoconf!
2008-09-23 11:05:44 -04:00
Peter Harris
dba26368e5 Fix panoramiX request and reply swapping
Fix panoramiX request and reply swapping
 Set window and screen values in panoramix replies
 Prevent buffer overrun in ProcPanoramiXGetScreenSize
(cherry picked from commit 2b266eda6e)
2008-09-23 10:36:20 -04:00
Julien Cristau
ce6424853c exa: disable shared pixmaps
They got re-enabled in ee7c684f21
("Reimplement ShmPutImage.")
(cherry picked from commit b4762c0245)
2008-09-23 10:36:02 -04:00
Jeremy Huddleston
0a55ed3965 XQuartz: 64bit crash fix ... don't pass pointers through xe.
(cherry picked from commit 5f1265b82e)
2008-09-21 17:40:08 -07:00
George Peter Staplin
98066a09e4 XQuartz: pbproxy: Add an X error handler that returns 0.
Move the struct atom_list into the x-selection class, so that it's
no longer a global variable named atoms.  This may ease pthread
integration and reduce the chances of symbols conflicting.
(cherry picked from commit c1403c713c)
2008-09-21 17:40:05 -07:00
George Peter Staplin
e1b5c9a339 XQuartz: pbproxy: Fix a bug that occured when a PICT format was available.
We may need another branch to convert a PICT to a PNG or JPEG.  For now
TIFF works well in all of the test image copying apps when converted to
PNG or JPEG with an NSBitmapImageRep class.
(cherry picked from commit adf339d8f9)
2008-09-21 17:40:03 -07:00
George Peter Staplin
8b66db54be XQuartz: pbproxy: Make the proxy handle copy request races, and PRIMARY
INCR transfers mixed with a CLIPBOARD change.

Fix a bug with some UTF-8 transfers.  I can only guess that my UTF-8
tests before were inadequate.  I can now copy/paste any characters between
uxterm and Textedit.app.
(cherry picked from commit 7ca1532e8e)
2008-09-21 17:40:01 -07:00
Jeremy Huddleston
d5ba8a5ca1 XQuartz: "Disable" the text when syncing is disabled.
(cherry picked from commit 7713d7ab66)
2008-09-21 17:39:58 -07:00
Jeremy Huddleston
a3095771ea XQuartz: Added a preferences UI for pbproxy options.
(cherry picked from commit d76cca5e1e)
2008-09-21 17:39:30 -07:00
George Peter Staplin
e58a1d1d27 XQuartz: pbproxy: Add a missing include of Xutil.h. Another header
seems to have done this before, but correctness matters.
(cherry picked from commit 1b4987e779)
2008-09-21 17:38:01 -07:00
George Peter Staplin
f8f5d75303 XQuartz: pbproxy: Add COMPOUND_TEXT handling. Do misc. cleanups with testing
to verify that the behavior didn't change.

main.m: XInternAtom compound_text, and atom_pair.

pbproxy.h: Add compound_text and atom_pair to the struct atom_list.

x-selection.m: Add an #include of Xutil.h.  Refactor the reply struct
initialization to be done in a common place.  Add send_reply: to simplify
the code a bit more.  Add send_compound_text: which handles the
COMPOUND_TEXT type.  Add the beginnings of a send_multiple:.  Change
handle_image:extension: to handle_image:.  The extension: message isn't
needed anymore.
(cherry picked from commit 1e9460abdf)
2008-09-21 17:37:59 -07:00
George Peter Staplin
9fdf04b675 XQuartz: pbproxy: pbproxy now responds to selection request events.
We can now copy and paste images to and from X11.  Text copying and
pasting works as well.

The NSPasteboard can contain TIFF or PICT images, and pbproxy will
translate to an image/png or image/jpeg request, and list those in the
TARGETS.

I added a description of the basic design at the top of x-selection.m.

I removed the request_data x_selection class struct.  It's not needed.
(cherry picked from commit 4a8daf8846)
2008-09-21 17:37:56 -07:00
George Peter Staplin
dc7af1b000 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 12912adaee)
2008-09-21 17:37:54 -07:00
Jeremy Huddleston
f706f88e4f XQuartz: Don't enable 8bit visuals in the TrueColor server, since it's not working yet
(cherry picked from commit 1317c8ff94)
2008-09-21 17:37:51 -07:00
George Peter Staplin
a59c231559 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 934669f732)
2008-09-21 17:37:49 -07:00
George Peter Staplin
8f663ab452 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 40190675a6)
2008-09-21 17:37:47 -07:00
George Peter Staplin
7c21789633 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 37361567b6)
2008-09-21 17:37:44 -07:00
George Peter Staplin
adbe6881c8 Add an image_jpeg Atom.
(cherry picked from commit ea9dc27977)
2008-09-21 17:37:42 -07:00
George Peter Staplin
61354ea80d Rename reclaim_clipboard to claim_clipboard.
(cherry picked from commit d333a8e2b5)
2008-09-21 17:37:40 -07:00
George Peter Staplin
05db9d6022 Add image/jpeg type, and rename reclaim_clipboard to claim_clipboard.
(cherry picked from commit 32b175ef62)
2008-09-21 17:37:37 -07:00
Jeremy Huddleston
981fddf2bf XQuartz: pbproxy: Added global variables to customize how pbproxy behaves
(cherry picked from commit 21a2d0b8d0)
2008-09-21 17:37:35 -07:00
Jeremy Huddleston
290e343281 XQuartz: pbproxy: First round of updates to pbproxy from George.
(cherry picked from commit 5c8b956f8f)
2008-09-21 17:37:32 -07:00
Aaron Plattner
3787660295 Conditionalize Composite-based backing store on pScreen->backingStoreSupport. 2008-09-17 15:48:56 -07:00
Jeremy Huddleston
e7487cfc46 XQuartz: Dead code removal
(cherry picked from commit 43184cd379)
2008-09-12 15:20:19 -07:00
Jeremy Huddleston
3788d6d786 XQuartz: 256 color support
(cherry picked from commit 8dd6d5c825)
2008-09-12 15:20:10 -07:00
Jeremy Huddleston
b62362472c XQuartz: Dead code removal
(cherry picked from commit bf10fb0b1f)
2008-09-12 15:19:57 -07:00
Jeremy Huddleston
e55c989cb6 XQuartz: Changed around fd handoff model to be more robust
(cherry picked from commit 4fe605c2bc)
2008-09-12 15:19:49 -07:00