Commit graph

14 commits

Author SHA1 Message Date
Jeremy Huddleston
49e59d32b8 XQuartz: pbproxy: Push dpy init and CFRunLoop hook setup into the pbproxy thread to avoid possible deadlock 2009-01-02 10:58:40 -08:00
Jeremy Huddleston
22f664ab95 XQuartz: pbproxy: Release display notification lock when not needed to avoid deadlock 2008-12-21 14:43:12 -08:00
Jeremy Huddleston
799715b8f3 XQuartz: pbproxy: Push the pbproxy Xevent processing into its own thread
and just have the AppKit thread wake it up.
2008-11-19 11:42:59 -08:00
Jeremy Huddleston
477c6968a8 XQuartz: pbproxy: nuke RCS Id, update header license/copyright 2008-11-16 17:57:46 -08:00
Jeremy Huddleston
4294493632 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).
2008-11-15 11:16:42 -08:00
Jeremy Huddleston
cbc0935ef7 XQuartz: pbproxy: SIGHUP reloads preferences. 2008-10-21 11:19:06 -07:00
Jeremy Huddleston
bcb83eea72 XQuartz: implemented primary-on-grab and fixed clipboard-to-pasteboard 2008-10-15 14:11:18 -07:00
Jeremy Huddleston
f7673bb4de XQuartz: xpbproxy: Support some of the preference toggles from X11.app, cleaned up CLIPBOARD_MANAGER atom management. 2008-10-04 18:54:15 -07:00
George Peter Staplin
4d51ad851e 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.
2008-10-01 00:03:29 -06:00
George Peter Staplin
602e8ba8f7 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.
2008-09-30 13:04:35 -06:00
George Peter Staplin
b245d84a72 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.
2008-09-23 12:39:32 -06:00
George Peter Staplin
934669f732 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.
2008-09-16 21:09:22 -06:00
Jeremy Huddleston
5c8b956f8f XQuartz: pbproxy: First round of updates to pbproxy from George. 2008-09-14 09:23:17 -07:00
Jeremy Huddleston
1f842c71c3 XQuartz: Added pasteboard proxy code stripped out of quartz-wm. 2008-09-03 09:16:16 -07:00