Commit Graph

22 Commits

Author SHA1 Message Date
Jeremy Huddleston 750d4e82a0 XQuartz: xpbproxy: Don't take down the whole server on an IO error
Calls pthread_exit to prevent _XIOError from calling exit()

This fixes http://xquartz.macosforge.org/trac/ticket/421

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-07-29 11:41:32 -07:00
Jeremy Huddleston d16bc8a3cd XQuartz: xpbproxy: Cleanup xpbproxy threading
Confine xpbproxy to a single thread
Runs inside its own CFRunLoop

Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2010-03-21 21:56:39 -07:00
Jeremy Huddleston e87a03fd53 XQuartz: pbproxy: Wait for the server to finish starting up, so display is valid.
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-11-11 18:00:19 -08:00
Jeremy Huddleston d8c9ba37ab XQuartz: pbproxy: Push dpy init and CFRunLoop hook setup into the pbproxy thread to avoid possible deadlock
(cherry picked from commit 49e59d32b88e4fad070f230b5efaa261b47f78db)
2009-01-02 11:02:42 -08:00
Jeremy Huddleston 94df1ab7f0 XQuartz: Force X11Controller to reset a broken DISPLAY envvar.
(cherry picked from commit f1a52b5b5ac31702497937efe3ac578be9a6c54f)
2008-11-25 11:53:06 -08:00
Jeremy Huddleston 065d2afb0c XQuartz: Add fallback for xpbproxy's display for Tiger or no-launchd-Leopard
(cherry picked from commit 7a8c6665949d7804a97ef2539a74ec4aa682e1cc)
2008-11-25 00:54:52 -08:00
Jeremy Huddleston d7ee76f9dd XQuartz: pbproxy: Push the pbproxy Xevent processing into its own thread
and just have the AppKit thread wake it up.
(cherry picked from commit 799715b8f3327c8da59ab45706e85af2d2c438e4)
2008-11-21 10:59:10 -08:00
Jeremy Huddleston c4ec71b405 XQuartz: pbproxy: nuke RCS Id, update header license/copyright
(cherry picked from commit 477c6968a88429bb9c10222a5836bdc936d10ab1)
2008-11-19 10:58:15 -08:00
Jeremy Huddleston e8112784e8 XQuartz: Integrated xpbproxy into the server.
Added a configure option called --enable-standalone-xpbproxy which is useful for deveoping xpbproxy.
The 'active' switch in preferences just disables the in-server xpbproxy (not this standalone).
(cherry picked from commit 42944936326ef8732f622db9f75b79a92980550d)
2008-11-15 19:52:34 -08:00
Jeremy Huddleston 28d4f71193 XQuartz: pbproxy: Fix compilation on case-sensitive file systems...
(cherry picked from commit 6622efca216663c99d112c7a226bde691d1f3215)
2008-10-23 16:30:53 -07:00
Jeremy Huddleston 2d764e21f2 XQuartz: pbproxy: SIGHUP reloads preferences.
(cherry picked from commit cbc0935ef74ebd76ed3db16d6ab86043eeed42a3)
2008-10-23 14:16:57 -07:00
Jeremy Huddleston 84ef8ed6fb XQuartz: implemented primary-on-grab and fixed clipboard-to-pasteboard
(cherry picked from commit bcb83eea729a01026d99d1cfc2b77385b5b275fd)
2008-10-15 17:31:54 -07:00
Jeremy Huddleston b3a971d8b5 XQuartz: xpbproxy: Support some of the preference toggles from X11.app, cleaned up CLIPBOARD_MANAGER atom management.
(cherry picked from commit f7673bb4de3c1f71eb390a3279eed3589efc3df4)
2008-10-04 21:17:02 -07:00
George Peter Staplin b1d0b19661 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 602e8ba8f7ee196696bc9e3cea6ecdf3200dcf5c)
2008-10-03 11:14:30 -07:00
Jeremy Huddleston b7ad86ff8a Xquartz: xpbproxy: Split out app-specific stuff to app-main.m in prep for making this into a thread.
(cherry picked from commit c2012138a520560f8a2160518ea73fced410c3b7)
2008-10-03 11:12:57 -07:00
Jeremy Huddleston ee87c9b024 XQuartz: pbproxy: Removed stray SPI include.
(cherry picked from commit 2fb2bc77b804d7b63002c1423cb0bfc658eeee45)
2008-09-26 12:31:18 -07:00
George Peter Staplin 586fbc91df 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 b245d84a72ee3929546cd11a6eba3c60fb4a4d95)
2008-09-26 12:31:06 -07:00
George Peter Staplin 852a0b0dde 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 c1403c713ca80104ae3736bd2ed1eb6ffa5192b6)
2008-09-21 17:40:42 -07:00
George Peter Staplin 749bdf19b2 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 1e9460abdf5bafe46215966bbef3e796cb1c33e0)
2008-09-21 17:40:16 -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 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