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 4294493632)
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)
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)
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)
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)