Commit Graph

4252 Commits

Author SHA1 Message Date
Jeremy Huddleston
ed235e3406 XQuartz: Require applewmproto-1.1.1 2008-10-16 22:36:00 -07:00
George Peter Staplin
165cbbb90c XQuartz: pbproxy: Fix 2 bugs with the preferences.
Add dump_prefs() for instrospection.

Make prefs_get_bool a little more clear.

In get_property don't assume that the Mac realloc(NULL, 0); returns
non-NULL.  We shouldn't depend on implementation-defined behavior too
much.

Add more commentary in various spots.

Add TARGETS in the TARGETS response.  I don't know why some X11 apps
do this, but it could be something that some weird toolkit/app tests
for.

In reload_preferences add preferences synchronization, so that xpbproxy
reloads the preferences, and picks up any changes.

Fix a typo/misspelling of the sync_clipboard_to_pasteboard preference.
2008-10-16 13:09:21 -06:00
Jeremy Huddleston
ef4d37c73f XQuartz: Fixed window levels. 2008-10-15 21:26:58 -07:00
Jeremy Huddleston
37fc7b5819 Depend on xtrans >= 1.2.2 for TRANS_NOXAUTH
(cherry picked from commit 6dbfca571f)
2008-10-15 17:30:16 -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
99be3d68b6 XQuartz: Some motion made towards supporting fullscreen. 2008-10-08 18:39:41 -07:00
Jeremy Huddleston
da73a34b12 1.4.2-apple19 2008-10-07 11:52:48 -07:00
Jeremy Huddleston
a11c905203 XQuartz: Fixed EXTRA_DIST for new GL files. 2008-10-07 11:39:08 -07:00
George Staplin
1056700971 XQuartz: GL: setVisualConfigs() copied the behavior of indirect.c which is wrong, with regard to the handling of xcalloc failure.
Use ErrorF for an error message after an xcalloc failure, and return instead of falling through to GlxSetVisualConfigs, or abort()ing at the test branch.
2008-10-07 12:12:38 -06:00
George Staplin
97173d4eda XQuartz: Call setVisualConfigs in InitOutput, and only when GLXEXT is defined. 2008-10-07 11:39:44 -06:00
George Staplin
190a3d5e5d XQuartz: GL: Add the proper license information to the new files, and add more commentary to setVisualConfigs(). 2008-10-07 11:31:48 -06:00
George Staplin
eb3c014e17 XQuartz: GL: Add the new C code to the Makefile.am.
Commit the darwin.c changes I missed in the last commit, for calling
setVisualConfigs().
2008-10-06 18:05:12 -06:00
George Staplin
fc86f9e448 XQuartz: GL: Provide code for getting the capabilities of the underlying system's CGL.
Add a setVisualConfigs that is called before the fbScreenInit, to setup the __GLXvisualConfigs.
2008-10-06 18:01:23 -06:00
Jeremy Huddleston
1fe7298a3b Xquartz: Fix parallel builds 2008-10-04 21:25:50 -07:00
Jeremy Huddleston
af9b1c164b 1.4.2-apple18 2008-10-04 21:07:50 -07:00
Jeremy Huddleston
2021c4c4e7 XQuartz: Bumped bundle version to 2.3.2 for beta1 2008-10-04 21:07:31 -07:00
Jeremy Huddleston
9b5d114092 XQuartz: pbcopy: Re-enabled some code I commented out for testing 2008-10-04 21:06:58 -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
Jeremy Huddleston
3a6898f487 XQuartz: GLX - enable_stereo defaults option should work now 2008-10-04 15:07:29 -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
Jeremy Huddleston
00ca0f4d83 XQuartz: Use "pointer" and "pen" for device names to please GDK. 2008-09-30 13:54:25 -07:00
Jeremy Huddleston
9a91d770a6 XQuartz: Workaround for initial pressure/tilt being sent as 0 with motion during the proximity event 2008-09-30 13:54:25 -07:00
Jeremy Huddleston
d79ccb45f6 XQuartz: Using absolute ranges for pointer location to increase resolution and better support tablets. 2008-09-30 13:54:25 -07:00
Jeremy Huddleston
8ed5faf058 XQuartz: Removed resolved comment about localization. 2008-09-30 13:54:24 -07: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
Jeremy Huddleston
2c8205ea8b XQuartz: Added some localizable strings that were missing. 2008-09-29 22:32:24 -07:00
Jeremy Huddleston
f415837619 XQuartz: Actually send the pointer event from the pen even if it happes to actually have 0 pressure and 0 tilt. 2008-09-29 22:26:20 -07:00
Jeremy Huddleston
c2012138a5 Xquartz: xpbproxy: Split out app-specific stuff to app-main.m in prep for making this into a thread. 2008-09-27 15:30:10 -07:00
Jeremy Huddleston
490cbe9888 XQuartz: Send AppleWMReloadPreferences where appropriate. 2008-09-27 15:00:19 -07:00
Jeremy Huddleston
8edc5fb38c XQuartz: Added a --enable-integrated-xpbproxy configure option for building xpbproxy as an app or as a thread. 2008-09-26 16:20:22 -07:00
Jeremy Huddleston
b350b06674 Added dep on applewmproto 1.1.0 2008-09-26 15:55:33 -07:00
George Peter Staplin
6333d619e7 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().
2008-09-25 14:16:20 -06:00
George Peter Staplin
82a4dc5f0f XQuartz: pbproxy: Fix a bug that rxvt brought out in STRING copying. Now I can copy and paste to/from rxvt correctly. 2008-09-25 12:31:58 -06:00
Jeremy Huddleston
93ab4e0071 XQuartz: Fixed threading issue with TSM. 2008-09-24 22:51:03 -07:00
Jeremy Huddleston
2fb2bc77b8 XQuartz: pbproxy: Removed stray SPI include. 2008-09-24 18:57:36 -07:00
George Peter Staplin
aa98db576b 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.
2008-09-23 13:59:25 -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
63a680354d 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.
2008-09-22 17:43:40 -06:00
Jeremy Huddleston
5f1265b82e XQuartz: 64bit crash fix ... don't pass pointers through xe. 2008-09-20 19:45:19 -07:00
George Peter Staplin
c1403c713c 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.
2008-09-20 17:49:16 -06:00
George Peter Staplin
adf339d8f9 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.
2008-09-19 21:28:46 -06:00
George Peter Staplin
7ca1532e8e 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.
2008-09-19 14:37:50 -06:00
Jeremy Huddleston
7713d7ab66 XQuartz: "Disable" the text when syncing is disabled. 2008-09-19 13:15:07 -07:00
Jeremy Huddleston
d76cca5e1e XQuartz: Added a preferences UI for pbproxy options. 2008-09-19 12:41:52 -07:00
George Peter Staplin
1b4987e779 XQuartz: pbproxy: Add a missing include of Xutil.h. Another header
seems to have done this before, but correctness matters.
2008-09-19 00:18:44 -06:00
George Peter Staplin
1e9460abdf 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.
2008-09-19 00:02:48 -06:00
George Peter Staplin
4a8daf8846 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.
2008-09-18 13:10:41 -06:00
George Peter Staplin
12912adaee 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.
2008-09-17 12:04:20 -06:00
Jeremy Huddleston
1317c8ff94 XQuartz: Don't enable 8bit visuals in the TrueColor server, since it's not working yet 2008-09-17 10:11:00 -07: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