Commit Graph

3170 Commits

Author SHA1 Message Date
Jeremy Huddleston
7711c56dd6 XQuartz: Fixed --disable-glx 2008-11-22 14:06:50 -08:00
George Staplin
b772d64fce XQuartz: GL: Remove the inclusion of glcontextmodes.h.
Add some commentary about future directions needed for the GLX drawable
creation and destruction code.

Match xalloc with xfree.

I made some minor formatting improvements.
2008-11-22 11:37:08 -07:00
George Staplin
17f6a261fc XQuartz: GL: Add a branch to prevent a NULL DrawablePtr structure access.
In attach() check for pDraw being NULL, and also print an ErrorF message,
because we eventually want to track down why this is occuring.

It's unclear how this occurs, but as I noted in the 1.4 branch, I believe that
the DrawablePtr/struct _Drawable -> id is the member being accessed that causes
KERN_PROTECTION_FAILURE at 0x0000000000000004

This passes my tests using: env LIBGL_ALWAYS_INDIRECT=1 ./sometest.

I fixed a warning: caused by initializing the screen->base.visuals with the
configs.  It is a ** not a *.  It seems that some other part of GLX will
initialize this for us.
2008-11-22 11:06:28 -07:00
George Staplin
047ac0b4fd XQuartz: GL: Add 1 __GLXconfig for testing purposes. Now glxgears runs.
It looks much better with the new GLX/libGL, perhaps because of the old libGL
not understanding all of the tags written.  At least glxgears works with both.

glxgears is not a test for all OpenGL features, so most likely some things
are broken still.  Direct rendering is known to not work, or at least being
reported as not working.
2008-11-21 18:27:42 -07:00
George Staplin
594e81c397 XQuartz: GL: Convert some of the indirect.c code to work with the change to __GLXconfig.
Fix some obvious errors with uninitialized new members of GLX structs.

Add a type argument for the screen's drawable creation function, and pass the type to
__glXDrawableInit().

GLX still doesn't work.  There is more work needed to get it working again.  This gets
it building at least, although there are some warnings in the dispatch table setup,
that seem to be caused by const differences.

I also #if 0ed a bunch of function bodies that will need to be revisited soon.
2008-11-21 17:31:10 -07:00
George Staplin
3bed9b65c8 XQuartz: GL: remove glcontextmodes.* from the Makefile.am. It has been replaced.
The new replacement is __GLXconfig.
2008-11-21 17:28:11 -07:00
Jeremy Huddleston
3a18cd5044 XQuartz: Don't use LS to find X11.app on Tiger.
(cherry picked from commit e62107e552)
2008-11-21 11:55:20 -08:00
Jeremy Huddleston
bf699f0ae7 XQuartz: spewCallStack is noop on Tiger now...
(cherry picked from commit 56c469a68b)
2008-11-21 10:59:36 -08:00
Jeremy Huddleston
c589c30e37 XQuartz: pbproxy: Added some typedefs for types not available on Tiger
(cherry picked from commit 0947aa7911)
2008-11-21 10:59:29 -08:00
Jeremy Huddleston
fc01b09acf XQuartz: More Tiger ifdefs
(cherry picked from commit 803509072f)
2008-11-21 10:59:21 -08:00
Jeremy Huddleston
d03f4b1764 XQuartz: Resurrect the old audio path for Tiger
(cherry picked from commit a61a8d9047)
2008-11-21 10:59:12 -08:00
Jeremy Huddleston
fc44266502 XQuartz: pbproxy: Push the pbproxy Xevent processing into its own thread
and just have the AppKit thread wake it up.
(cherry picked from commit 799715b8f3)
2008-11-21 10:59:07 -08:00
Jeremy Huddleston
b02b5593d5 XQuartz: pbproxy: nuke RCS Id, update header license/copyright
(cherry picked from commit 477c6968a8)
2008-11-19 10:58:11 -08:00
Jeremy Huddleston
1ed6b4d101 XQuartz: pbproxy: Remove thread-main.m
it got accidently added and isn't used.
(cherry picked from commit cb6ffce68a)
2008-11-19 10:58:00 -08:00
Jeremy Huddleston
6baa808a85 XQuartz: Don't use TIS on Tiger...
(cherry picked from commit be8ac84c15)
2008-11-15 19:52:46 -08:00
Jeremy Huddleston
ceaf1c7e55 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 4294493632)
2008-11-15 19:51:59 -08:00
Jeremy Huddleston
763195d338 XQuartz: Actually add glcontextmodes.[hc] 2008-11-14 15:13:22 -08:00
Ben Byer
460b63af21 fix compilation on systems that don't have
XP_EVENT_SPACE_CHANGED defined
(cherry picked from commit 6e833e41e2)
2008-11-14 15:09:39 -08:00
Jeremy Huddleston
a186cab6ae XQuartz: Initial work on readding GLX to the 1.5 server 2008-11-14 14:57:09 -08:00
Jeremy Huddleston
b5bb6dbc8f Xquartz: Force sending mouse clicks to AppKit if we're over the menu bar
(cherry picked from commit 7dff93ec1a)
2008-11-14 11:09:53 -08:00
Jeremy Huddleston
84c68a9699 XQuartz: Made X11Application.m a little more tidy.
(cherry picked from commit 3520386261)
2008-11-14 11:09:45 -08:00
Jeremy Huddleston
82a03b631c XQuartz: Fixed XBell() when not using system alert.
(cherry picked from commit aa0e9ab1c7)
2008-11-13 11:34:12 -08:00
Jeremy Huddleston
628679275f XQuartz: Added more debugging to handoff spew
(cherry picked from commit acefa7e3c8)
2008-11-13 11:34:07 -08:00
George Staplin
73493d1ce9 XQuartz: GL: Handle the alpha differently when the alpha is equal to GLCAPS_COLOR_BUF_INVALID_VALUE.
This prevents visuals with odd sizes.  The machine I use didn't have
this problem, but it shows up on some others.
(cherry picked from commit ed181382dd)
2008-11-13 11:33:59 -08:00
George Staplin
33b8ee7846 XQuartz: Disable 2 calls to miSetVisualTypesAndMasks that seem to be unnecessary, and possibly wrong (with regard to masks and bits per RGB).
Use the settings queried from the system in xprScreen.c, rather than those 2 calls.

The 2 calls increased the total number of visuals a great deal (when using GLXEXT),
and not all of the visuals were usable with GLX.  Some of the visuals aren't usable
with GLX still, such as DirectColor, but that seems to be acceptable based on my
understanding of the manual that states "a subset of visuals are made available
for OpenGL rendering."
(cherry picked from commit 373b8a5f32)
2008-11-13 01:19:26 -08:00
Jeremy Huddleston
bd8098d05b XQuartz: CFBundleShortVersionString needs to conform to X.Y.Z as well... sigh
(cherry picked from commit 54d20f6d33)
2008-11-13 01:19:16 -08:00
George Staplin
d1d398db76 XQuartz: Restore the logic of AppleWMDoReorderWindow to the same as the 1.4 branch.
It was returning inverted values in comparison to the 1.4 branch.  This resulted in
the windows not drawing due to a deep path of: RootlessReorderWindow ->
SCREENREC(pScreen)->imp->DoReorderWindow(winRec) - > xprDoReorderWindow ->
AppleWMDoReorderWindow.
2008-11-13 01:33:58 -07:00
Jeremy Huddleston
43f3dfbbd6 XQuartz: Make LS parse our version properly... it didn't like our CFBundleVersion
(cherry picked from commit 980df1b4ff)
2008-11-06 14:49:46 -08:00
George Peter Staplin
9c76ed49cc XQuartz: GL: Add capability detection for depth buffers, and multisampling.
GL/capabilities.c: Add handleDepthModes(), and extend
handleRendererDescription() for the various depth and multisampling flags.

Add initialization of the new config options to initConfig().

GL/capabilities.h: Add depth and multisample config members.

GL/visualConfigs.c: Add depth and multisampling support to the visual config
setup.
(cherry picked from commit f527381eea)
2008-11-05 19:20:55 -08:00
George Peter Staplin
caa049246f XQuartz: GL: Work around problems with really deep visuals.
GL/capabilities.c: #if 0 (for now) any capabilities above 8 bits per channel,
because they introduce drawing problems.

GL/indirect.c: Comment out some visual setup code that shouldn't be running, and
actually seemed to cause some problems.  The current visualConfigs.c code seems
to do a reasonable job of setting up visuals for XQuartz.

GL/visualConfigs.c: Make use of the proper visual .class.   Eliminate depth 0.
It seems we really just want 24 for now, and 0 I think was a flaw in the original
code.
(cherry picked from commit 1e5f63f15e)
2008-11-05 19:20:50 -08:00
Jeremy Huddleston
a3a4746d25 XQuartz: Replace deprecated API usage thanks to Robery Murphy
(cherry picked from commit 71dd052412)
2008-11-05 19:20:44 -08:00
Jeremy Huddleston
f333d0ae6f XQuartz: version string updated for 2.3.2_beta3
(cherry picked from commit 81bb412857)
2008-11-05 19:20:38 -08:00
Jeremy Huddleston
fec491e316 Merge branch 'server-1.5-branch' into xorg-server-1.5-apple 2008-11-05 19:20:26 -08:00
Julien Cristau
b0c2d00985 xfree86: fix compiler warnings in DoModalias()
The precedence of == is higher than that of &, so that code was
probably buggy.

xf86Init.c: In function 'DoModalias':
xf86Init.c:300: warning: suggest parentheses around comparison in operand of &
xf86Init.c:304: warning: suggest parentheses around comparison in operand of &
xf86Init.c:308: warning: suggest parentheses around comparison in operand of &
(cherry picked from commit ffaaa1a198)
2008-11-05 14:41:11 -05:00
Nathaniel McCallum
a311fdc040 Xorg: add -modalias option
This scans the installed video drivers and prints a Linux-style modalias
listing of the devices each driver claims to support.
2008-11-05 14:40:59 -05:00
Adam Jackson
377712dbfc linux: Drain the console fd of data when using evdev for keyboards
Works around a silly bug in the kernel that causes wakeup storms after
too many keypresses.  Should fix the kernel bug too, but this at least
keeps the idle wakeup count below 1000/sec.
(cherry picked from commit 446d9443ce)
2008-11-05 13:37:36 -05:00
Peter Hutterer
3245bf1136 xfree86: If AEI is on, disable "kbd" and "mouse" devices.
This consists of two parts:
In the implicit server layout, ignore those drivers when looking for a core
device.

And after finishing the server layout, run through the list of devices and
remove any that use mouse or kbd.

AEI is mutually exclusive with the kbd and mouse drivers, so pick either - or.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
(cherry picked from commit c264826da9)
2008-11-05 13:36:42 -05:00
Peter Hutterer
58e6d6afe0 xfree86: if AllowEmptyInput is true, enable RAW mode on the console.
Usually, the console is set to RAW in the kbd driver. If we hotplug all input
devices (i.e. the evdev driver for keyboards) and the console is left as-is.
As a result, the evdev driver must put an EVIOCGRAB on the device to avoid
characters leaking onto the console. This again breaks many things, amongst
them lirc, in-kernel mouse button emulation and HAL.

This patch sets the console to RAW if AllowEmptyInput is on.

Use-cases:
1. AEI is off
  1.1. Only kbd driver is used - behaviour as-is.
  1.2. kbd and evdev driver is used: if evdev does not grab the device,
       duplicate events are generated.
2. AEI is on
  2.1. Only evdev driver is used - behaviour as-is, but evdev does not need
       to grab the device anymore.
  2.2. evdev and kbd are used: duplicate key events are generated if evdev
       does not grab the device.

1.2 is a marginal use-case that can be fixed by adding a "grab" option to the
evdev driver (update of xorg.conf is needed).

2.2 is an issue. If we have no ServerLayout section, AEI is on, but devices
specified in the xorg.conf are still added [1], resulting in duplicate events.
This is a common configuration and needs sorting out.

[1] 2eaed4a10f

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit d936a4235c)
2008-11-05 13:35:26 -05:00
Rémi Cardona
b28c25b5ae Force LC_ALL=C when building xf86DefModeSet.c
Fixes build in not-quite-latin locales.
2008-11-05 11:49:49 -05:00
Martin von Gagern
992a7168f0 Bug #17858: Fix Xvesa build on newer kernels.
Not cherry picked from master, Xvesa is gone there.
2008-11-05 11:44:03 -05:00
Jeremy Huddleston
fa6db0bcd2 XQuartz: Add option to allow access to the menu in fullscreen mode
(cherry picked from commit 637a9f4bd1)
2008-10-31 20:05:29 -07:00
Jeremy Huddleston
b7ec1fa59c XQuartz: LP64 related casting fixes from Bob Murphy
(cherry picked from commit ea71710aaa)
2008-10-31 19:03:23 -07:00
Jeremy Huddleston
75733791d3 XQuartz: displayScreenBounds uses quartzEnableRootless rather than !quartzHasRoot
(cherry picked from commit c883a78ef0)
2008-10-31 15:51:44 -07:00
Jeremy Huddleston
251ae8dbdc XQuartz: Silence pointer debug spam
(cherry picked from commit 9ca099e928)
2008-10-31 15:51:32 -07:00
Jeremy Huddleston
16cf8cd2e3 XQuartz: Don't map the menu bar to the screen area.
(cherry picked from commit 1115917ada)
2008-10-31 15:51:27 -07:00
Jeremy Huddleston
f95df525b1 XQuartz: Fixed Xplugin thread safety issues, so rea-enable background window check
(cherry picked from commit 5fc73b1141)
2008-10-31 15:51:22 -07:00
George Peter Staplin
5378c3715a XQuartz: GL: Mark visuals that are slower than others, due to lack of acceleration.
This is used in libGL to determine a preferred visual.  glxinfo -v will also
report "visualCaveat=Slow" for such visuals.
(cherry picked from commit d5c17f585a)
2008-10-31 15:51:16 -07:00
Jeremy Huddleston
cfe04bc226 XQuartz: if 0 out a block to avoid thread-unsafe lockups
(cherry picked from commit 60d7359a67)
2008-10-31 15:50:58 -07:00
Jeremy Huddleston
770ae89d98 XQuartz: Purge the old XQUARTZ_EXPORTS_LAUNCHD_FD option
(cherry picked from commit 490756c7fb)
2008-10-31 15:50:52 -07:00
Jeremy Huddleston
996e509436 Merge branch 'server-1.5-branch' into xorg-server-1.5-apple 2008-10-28 22:18:18 -07:00
Jeremy Huddleston
953e0c2f59 XQuartz: Pass along SIGINT and SIGTERM from the stub to X11.app
(cherry picked from commit 183ca5d68b)
2008-10-28 21:59:59 -07:00
George Peter Staplin
c1cd92dc2f XQuartz: pbproxy: Fix a bug that prevented nedit CLIPBOARD from being proxied.
It seems that we were calling copy_completed: too soon.  Now we return instead
of falling through to the free_propdata, and copy_completed:.
(cherry picked from commit 5797d5b662)
2008-10-28 21:59:55 -07:00
George Peter Staplin
7f096c8c17 XQuartz: pbproxy: Work around bugs in some apps that aren't ICCCM compliant.
Eterm ends up setting the type of the property to TARGETS, instead of ATOM.
That's why it wasn't working.
(cherry picked from commit 9be5998ede)
2008-10-28 21:59:50 -07:00
George Peter Staplin
7cf23e472c XQuartz: pbproxy: Add code to handle PICT conversion to PNG and JPEG.
This may work, unfortunately I don't have test apps that fail.

The way it works is by using an NSImage class initWithPasteboard:
method, which we then get the TIFFRepresentation of, and convert
to PNG or JPEG.

The TIFFRepresentation uses NSTIFFCompressionNone; which should be
lossless.
(cherry picked from commit 8d048cfa95)
2008-10-28 21:59:44 -07:00
Jeremy Huddleston
d79c581135 XQuartz: pbproxy: fixed blocking
(cherry picked from commit bb330a1b1c)
2008-10-28 21:59:38 -07:00
Jeremy Huddleston
f7b9ceea1e Xquartz: pbproxy: Some debugging about unhandled mime types... this will spam up quick, but will be useful for a while...
(cherry picked from commit 3647215310)
2008-10-28 21:59:33 -07:00
George Peter Staplin
a269d54c32 XQuartz: GL: Fix several error handling mistakes in handleRenderDescriptions, that were leftover before the final code evolved.
(cherry picked from commit fe35a36390)
2008-10-28 21:59:29 -07:00
George Peter Staplin
73566cef7c XQuartz: GL: Add feature detection of color sizes, and accum sizes.
This gives us a *lot* more visuals, and they should be more accurate.
Some of the visuals may have been wrong before.  This may enable more
OpenGL programs to behave correctly.

I also suspect libGL needs a little work to handle some of these correctly.
(cherry picked from commit 98a084ce9c)
2008-10-28 21:59:24 -07:00
Maarten Maathuis
ec5046ca75 dri: don't set the dixPrivate key to NULL, as this is a staticly set variable.
- This breaks on the 2nd server generation.
- No other subsystem seems to NULL their key.
- This should fix bug 17982.
(cherry picked from commit 5b336585a4)
2008-10-27 09:47:45 -04:00
Adam Jackson
b468eacf51 kdrive: Hardcode a different wrong value for number of mouse buttons
This should really come from the input driver directly, but, kdrive.
(cherry picked from commit 3eb52de7f2)
2008-10-27 09:46:46 -04:00
Adam Jackson
7df5e93cf5 Move xorg_backtrace() up to the OS level so we can call it from DIX.
(cherry picked from commit 94ed0ba1b5)
2008-10-27 09:46:28 -04:00
Adam Jackson
aa548b0a9b EDID: Catch even more cases of encoding aspect as size.
Very cute, Samsung, not only do you claim to be 16cm by 9cm in the
global size record, you also claim to be 160mm by 90mm in the detailed
timings.  Grrr.
(cherry picked from commit bd9c6b3a4d)
2008-10-27 09:46:22 -04:00
Jeremy Huddleston
733cb50011 XQuartz: Do check_xinitrc() later to avoid possible deadlock.
(cherry picked from commit af95174a08)
2008-10-23 19:20:29 -07:00
George Peter Staplin
882ae87740 XQuartz: pbproxy: pbproxy.h had invalid macro usage with 2 #else statements, so it wasn't building. Fix the build.
(cherry picked from commit 6bcbb9ba85)
2008-10-23 19:20:21 -07:00
George Peter Staplin
49b7a7c6f2 XQuartz: Remove the enable_stereo default. We now use feature detection to enable stereo visuals.
We need to revisit the GL/indirect.c changes.  I think indirect.c should
be using the same feature detection and GLX visual config code.  The
indirect changes will require testing...
2008-10-23 17:43:12 -06:00
Jeremy Huddleston
f285130dff XQuartz: pbproxy: Fix compilation on case-sensitive file systems...
(cherry picked from commit 6622efca21)
2008-10-23 16:30:28 -07:00
Jeremy Huddleston
524dc8cb61 XQuartz: Comment explaining the 0x10 flag for [e data2]
(cherry picked from commit 3c69528064)
2008-10-23 14:16:03 -07:00
Jeremy Huddleston
43d0bd6354 XQuartz: Honor the Spaces preference for "When switching to an application, switch to a space with open windows for the application"
(cherry picked from commit bf561a06b2)
2008-10-23 14:15:48 -07:00
Jeremy Huddleston
a1b7a04c66 XQuartz: Added missing semicolons to Localizable.strings
(cherry picked from commit e9fe3f36d9)
2008-10-23 14:15:41 -07:00
Jeremy Huddleston
1519cffe1c XQuartz: Default dpi to 96 instead of 75
(cherry picked from commit 08a5a333d7)
2008-10-23 14:15:33 -07:00
Jeremy Huddleston
7e6f91e90a XQuartz: pbproxy: SIGHUP reloads preferences.
(cherry picked from commit cbc0935ef7)
2008-10-23 14:15:22 -07:00
Jeremy Huddleston
b8a3022424 XQuartz: Only send mouse events while in the background if we're over a visible window.
This "breaks" xeyes but gets rid of annoying tooltips.
(cherry picked from commit 10090a132a)
2008-10-21 09:31:17 -07:00
Jeremy Huddleston
de4fe10ac2 XQuartz: More fullscreen fixes
Start in rooted mode when enabled
  Make the hotkey cmd-alt-a behave
(cherry picked from commit 22a54e4617)
2008-10-21 09:31:11 -07:00
Jeremy Huddleston
71ab6f5bd6 XQuartz: Cleaned up keyboard init and map reload.
(cherry picked from commit f78c9fc06c)
2008-10-21 09:31:04 -07:00
Jeremy Huddleston
f311a452c9 XQuartz: Fixed follow-keyboard-layout
≈
(cherry picked from commit a9f9fbf512)
2008-10-21 09:30:55 -07:00
Jeremy Huddleston
b47b7ab6d6 XQuartz: More progress towards fullscreen...
(cherry picked from commit 628cae86b4)
2008-10-21 09:29:37 -07:00
Jeremy Huddleston
5ed1b67619 XQuartz: Fixed missing key-equiv for Hide-Others.
(cherry picked from commit 2c4b0f9615)
2008-10-21 09:25:12 -07:00
George Peter Staplin
7863c44829 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.
(cherry picked from commit 165cbbb90c)
2008-10-21 09:24:56 -07:00
Jeremy Huddleston
d43d82a422 XQuartz: Fixed window levels.
(cherry picked from commit ef4d37c73f)
2008-10-21 09:24:44 -07:00
Jeremy Huddleston
f5201d47d0 Merge branch 'server-1.5-branch' into xorg-server-1.5-apple 2008-10-15 17:31:44 -07:00
Jeremy Huddleston
02a05bbdf2 XQuartz: implemented primary-on-grab and fixed clipboard-to-pasteboard
(cherry picked from commit bcb83eea72)
2008-10-15 17:31:40 -07:00
Adam Jackson
75504517a3 EDID: Catch monitors that encode aspect ratio for physical size.
This is not legal in either EDID 1.3 or 1.4, but hey, when did a little
thing like legality stop anyone.
(cherry picked from commit 0660dd9d70)
2008-10-10 14:12:57 -04:00
Jeremy Huddleston
42d1454507 Merge branch 'server-1.5-branch' into xorg-server-1.5-apple 2008-10-08 18:43:55 -07:00
Jeremy Huddleston
d039c05b1f XQuartz: Some motion made towards supporting fullscreen.
(cherry picked from commit 99be3d68b6)
2008-10-08 18:43:42 -07:00
Jeremy Huddleston
4915d88858 XQuartz: Fixed EXTRA_DIST for new GL files.
(cherry picked from commit a11c905203)
2008-10-08 18:43:31 -07:00
George Staplin
1953956be8 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.
(cherry picked from commit 1056700971)
2008-10-08 18:43:20 -07:00
Jeremy Huddleston
3ea371c9e5 XQuartz: Call setVisualConfigs in InitOutput, and only when GLXEXT is defined.
(cherry picked from commit 97173d4eda)
2008-10-08 18:43:10 -07:00
George Staplin
e2655ab188 XQuartz: GL: Add the proper license information to the new files, and add more commentary to setVisualConfigs().
(cherry picked from commit 190a3d5e5d)
2008-10-08 18:41:51 -07:00
George Staplin
cb19d0faec 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().
(cherry picked from commit eb3c014e17)
2008-10-08 18:41:39 -07:00
George Staplin
b6eddd80a4 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.
(cherry picked from commit fc86f9e448)
2008-10-08 18:41:29 -07:00
Jeremy Huddleston
3dd6d78fd5 Xquartz: Fix parallel builds
(cherry picked from commit 1fe7298a3b)
2008-10-08 18:41:20 -07:00
Luc Verhaegen
8337c9aa3d DGA: Fix ProcXF86DGASetViewPort for missing support in driver.
Fixes a segfault when trying to activate a DGA mode without checking
whether DGA modesetting is at all possible.
(cherry picked from commit 1feb69eb63)
2008-10-08 11:21:49 -04:00
Zhenyu Wang
4e6cbd3238 Check nextEnabledOutput()'s return in bestModeForAspect()
In case no enabled outputs, we will reference wrong index of
output array.
(cherry picked from commit 56c615368c)
2008-10-08 11:21:39 -04:00
Adam Jackson
43e3af9cac int10: Fix a nasty memory leak.
(cherry picked from commit 94919480d8)
2008-10-08 11:16:56 -04:00
Adam Jackson
00ac80a0c4 int10: Don't warn when scanning for devices we don't have.
Some BIOSes (hi XGI!) will attempt to enumerate the PCI bus by asking
for the config space of every possible device number.  This despite
perfectly functional BIOS methods to enumerate the bus exactly.
(cherry picked from commit a57b2f172c)
2008-10-08 11:16:52 -04:00
Adam Jackson
c6ce2f6b3f int10: Remove useless check.
If you have more than one PCI device with the same d/b/d/f, you're
already in trouble.
(cherry picked from commit a65e36a873)
2008-10-08 11:16:48 -04:00
Jeremy Huddleston
9980180abc XQuartz: Bumped bundle version to 2.3.2 for beta1
(cherry picked from commit 2021c4c4e7)
2008-10-04 21:16:22 -07:00
Jeremy Huddleston
56f5e8238b XQuartz: pbcopy: Re-enabled some code I commented out for testing
(cherry picked from commit 9b5d114092)
2008-10-04 21:16:18 -07:00
Jeremy Huddleston
55d7956f11 XQuartz: xpbproxy: Support some of the preference toggles from X11.app, cleaned up CLIPBOARD_MANAGER atom management.
(cherry picked from commit f7673bb4de)
2008-10-04 21:16:10 -07:00
Jeremy Huddleston
cc228b8869 XQuartz: GLX - enable_stereo defaults option should work now
(cherry picked from commit 3a6898f487)
2008-10-04 21:15:54 -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
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
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
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
Jeremy Huddleston
df2de85c90 XQuartz: Don't warp the pointer on server start for XQuartz
(cherry picked from commit c0da576d49)
2008-09-12 15:19:39 -07:00
Jeremy Huddleston
519460e998 XQuartz: Make WarpPointer multithread safe in XQuartz.
(cherry picked from commit c1caeb52a4)
2008-09-12 15:19:29 -07:00
Jeremy Huddleston
5bde9444c8 XQuartz: Dead code removal
(cherry picked from commit 2e45344870)
2008-09-12 15:19:14 -07:00
Jeremy Huddleston
448427a231 XQuartz: Fixed proximity logic errors for tablets.
(cherry picked from commit d942849f24)
2008-09-12 15:19:05 -07:00
Jeremy Huddleston
d96f2c5978 Merge branch 'server-1.5-branch' into xorg-server-1.5-apple 2008-09-12 15:16:16 -07:00
Adam Jackson
f385303cd0 Fix strict-aliasing silliness in XAA.
(cherry picked from commit 613ce09550)
2008-09-03 18:58:43 -04:00
Jeremy Huddleston
144746223d XQuartz: Added pasteboard proxy code stripped out of quartz-wm.
(cherry picked from commit 1f842c71c3)
2008-09-03 09:23:06 -07:00
Jeremy Huddleston
fafcafd6de XQuartz: Updated Tablet code to include ranges for valuators and added cursor and erasor
(cherry picked from commit 6bca787609)
2008-09-03 09:22:22 -07:00