Commit Graph

3656 Commits

Author SHA1 Message Date
Ander Conselvan de Oliveira
0df12a3f01 xfree86: Remove device from inputInfo.devices if ActivateDevice failed.
After the call to xf86ActivateDevice, the new device will be added to
inputInfo.devices. However, if the subsequent call to ActivateDevice
fails, the correponding InputInfoRec for the device is deleted but an
entry still remains in inputInfo.devices. This might lead to a server
crash later on (on InitAndStartDevices for instance) when the device
control proc would be called for an invalid device.
(cherry picked from commit efa31092d6)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-08 12:31:41 -07:00
Ian Romanick
199bb36715 DRI2: Send the version the code actually supports
This prevents building an older server with a new dri2proto.h from
resulting in a DRI2 extension module that lies about the version it
supports.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 44227ef1b7)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-08 12:23:27 -07:00
Adam Jackson
667865b9eb randr: Fix thinko in xf86TargetPreferred
The only-one-output case would only work right if that also happened to
be the zeroth output.  Oops.
(cherry picked from commit 8a6ed44a8b)
2009-03-20 16:58:06 -07:00
Jeremy Huddleston
10e0603fb9 XQuartz: Re-enable support for capslock
(cherry picked from commit 4901b8147e)
2009-02-25 11:35:19 -08:00
Michel Dänzer
e96921ca95 DRI1: Make DRICreateDrawable return TRUE for pixmaps.
GLX_EXT_texture_from_pixmap was broken since commit
a26c77ff43 ('glx: fix retval checks when failures
occur for drawable creation.')

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
(cherry picked from commit ef320bdd5e)
2009-02-25 11:34:48 -08:00
Alan Coopersmith
584f46b81c Add Extensions section to xorg.conf man page
Extensions section was added in X11R6.8.0 and documented in the release notes:
   http://www.x.org/archive/X11R6.8.0/doc/RELNOTES2.html#3
but never made it into the man page.

Also fix a bonus typo.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
(cherry picked from commit ab61033700)
2009-02-25 11:34:29 -08:00
Keith Packard
ae7991b16d Pre-clip panning coordinates to keep crtc within panning region
There is a separate panning region check, but that doesn't work under
transformation, so just pre-clip the mouse coordinates when computing the
panning offsets. This leaves the case where panning constants are changing
unresolved.

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry pick from commit c090f5514d)
2009-02-25 11:27:15 -08:00
Keith Packard
9a59e7f304 xf86CrtcShadowClear is unused.
Remove this now that clearing is done by repainting with appropriate extend
modes.
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 60a4f1368785d26a49a3ef6df829723ca154c154)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-19 20:55:53 -08:00
Keith Packard
369d7b22a9 Make panning+transform be correctly driven by mouse
Figuring out how to adjust the crtc origin to keep the mouse pointer within
the crtc is a bit of a trick

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 63810aca31b962c93be4796883bde6ccb653e3a9)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-19 20:55:25 -08:00
Alan Coopersmith
c0a3619700 Make RgbPath keyword in xorg.conf a non-fatal error
Xorg shouldn't refuse to run just because the user has an xorg.conf that
had the previously-used RgbPath keyword in it.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit d2cf562bba)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-19 13:43:40 -08:00
Keith Packard
4557b3f6c4 X11/fonts/fontmod.h doesn't exist anymore.
libXfont 1.4.0 no longer includes this file, nor do we need it, so just stop
attempting to reference it.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-18 16:43:23 -08:00
Jeremy Huddleston
8e16e64f55 XQuartz: Don't need GlxSetVisualConfig any more
Fixes build failure resulting from 516f8e2cad
(cherry picked from commit 066b17028a)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-18 10:19:37 -08:00
Keith Packard
a86dd529e9 Eliminate the shadow clear on transform change
When the crtc transformation changes, the entire crtc must be repainted.
This was being done by clearing the shadow and then painting the rectangle
containing the screen image; the clear being required as the screen image
may not fill the crtc. When changing the transform rapidly, this leads to
flashing. Eliminate the clear by painting the entire crtc instead of just
the screen rectangle.

(cherry picked fom commit 5394b7e662)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 21:41:42 -08:00
Keith Packard
5946d603e7 Add XkbDir to Files config file section
The XKB base directory was not configuable through the config file.

(cherry picked from commit 76f18b94bd)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 19:12:44 -08:00
Paulo Cesar Pereira de Andrade
69a2728891 Default to use standard bitmap fonts, with builtins as fallback
The builtin-fonts configure option was removed, as it at best should
have been a runtime option. Instead, now it always register all "font
path element" backends, and adds built-ins fonts at the end of the
default font path.
  This should be a more reasonable solution, to "correct" the most
common Xorg FAQ (could not open default font 'fixed'), and also don't
break by default applications that use only the standard/historical
X Font rendering.
(cherry picked from commit 49b93df8a3)

    Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 19:10:14 -08:00
Keith Packard
4302a32391 Make crtc_notify wrap/unwrap code do nothing unless mode code is inuse
Drivers not using the new hw/xfree86/modes code would crash in DRI due to
that code trying to monitor CRTC changes.

(cherry picked from commit ea309e4745)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 19:07:13 -08:00
Jeremy Huddleston
09cde70a6b XQuartz: GLX: Fix accidental exclusion of glBlitFramebufferEXT on Leopard
(cherry picked from commit 8620579483)
(cherry picked from commit 0dbc356795)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 19:02:43 -08:00
Jeremy Huddleston
6bbe98f01d XQuartz: GLX: OpenGL.framework on Tiger doesn't have glBlitFramebufferEXT
(cherry picked from commit e01662cadc)
(cherry picked from commit fd08be749e)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 19:02:37 -08:00
Jeremy Huddleston
519ae3a0df XQuartz: Don't need explicit Activate/EnableDevice in InitInput
(cherry picked from commit b1d2978441)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 19:02:28 -08:00
Eric Anholt
516f8e2cad glx: Replace broken GLX visual setup with a fixed "all" mode.
With trying to match depths so that you didn't end up with a depth 24
fbconfig for the 32-bit composite visual, I broke the alpha bits on the depth
24 X visual, which angered other applications.  But in fixing that, the
pickFBconfigs code for "minimal" also could end up breaking GLX visuals if
the same FBconfig was chosen for more than one X visual.
We have no reason to not expose as many visuals as possible, but the old
"all" mode didn't match any existing X visuals to GLX visuals, so normal
GL apps didn't work at all.

Instead, replace it with a simple combination of the two modes: Create GLX
visuals by picking unique FBconfigs with as many features as possible for
each X visual in order.  Then, for all remaining FBconfigs that are
appropriate for display, add a corresponding X and GLX visual.

This gets all applications (even ones that aren't smart enough to do FBconfigs)
get all the options to get the visual configuration they want.  The only
potential downside is that the composite ARGB visual is unique and gets a
nearly full-featured GLX visual (except that the root visual might have taken
the tastiest FBconfig), which means that a dumb compositing manager could
waste resources. Write compositing managers using FBconfigs instead, please.
(cherry picked from commit c40bad88475debf7a1774e22dce835577ad32154)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 19:00:41 -08:00
Keith Packard
536748aa88 Merge branch 'panning-for-server-1.6' into server-1.6-branch 2009-02-17 18:52:04 -08:00
Paulo Cesar Pereira de Andrade
8c6ddbf754 Correct static symbol XkmReadTOC and first pass on compile warning fixes.
The warnings corrected were only the ones that should correct
real problems. The most common one is 64 bit integers as
"printf %l" arguments.
  Note that there is a patch related to this at:
http://bugs.freedesktop.org/show_bug.cgi?id=18204

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 16b11cd03d)
2009-02-17 15:49:06 -08:00
Peter Hutterer
0c9db0ea10 xfree86: always force RAW mode under linux.
The previous check for AEI on left us with the possibility that AEI is forced
off in the config, but devices are added through evdev nonetheless. A keyboard
added this way can CTRL+C the server. Even when we use kbd, we can set the
mode to RAW, so it's safer alround to to so.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit b339052340)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 14:49:50 -08:00
Alan Coopersmith
3284b03dca Check for and report errors writing xorg.conf.new from Xorg -configure
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
(cherry picked from commit ac470dfb4f)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 14:48:19 -08:00
Alan Coopersmith
caf503aef1 Correct error message if specified config file is not found
By making the "Unable to open config file" header a warning, it was
not appearing with the filename when a config file was specified and
not found.   Now we make it an error message again, but only issue
the error if a filename was specified - if none was specified, then
we don't even issue a warning, just the "Using autoconfig" info message.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
(cherry picked from commit bd713794ce)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 14:47:43 -08:00
Keith Packard
791c6eccee Handle the combination of panning and crtc transforms
This patch gets the shadow scanout buffer repainted on panning area changes.
It does not, however, track the mouse correctly.

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 7968823cbc)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 14:43:25 -08:00
Keith Packard
099d74a127 Damage re-used shadow scanout buffer using new transforms.
When the shadow scanout buffer can be re-used, the underlying framebuffer
area must be damaged so that the scanout will be repainted. This patch
delays the addition of that damaged area until after the transform in the
crtc has been updated, otherwise the old transform would have been used and
the wrong area repainted.

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 763df9eec7)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 14:43:25 -08:00
Xiang, Haihao
ef796a95dd avoid a potential endless loop.
Previously it is possible that creating rotation data, then cleaning
up and creating again so that pScreen->BlockHandler and
xf86_config->BlockHandler all point to xf86RotateBlockHandler.
See bug #19343.
(cherry picked from commit 5f3188228e)
2009-01-30 16:56:09 -08:00
George Staplin
840b4da5f2 XQuartz: GL: indirect.c changes to fix the build with newer OpenGL frameworks.
(cherry picked from commit 143224405b)
2009-01-30 16:44:50 -08:00
Jeremy Huddleston
97a6f55f22 XQuartz: SnowLeopard: Help system book name changed in 10.6
(cherry picked from commit b57cb05c69)
2009-01-30 16:44:50 -08:00
Jeremy Huddleston
b530a0e97b XQuartz: Fix builddir != srcdir issues and undef _XSERVER64 where appropriate on fat binary compilation
(cherry picked from commit f020900641)
2009-01-30 16:44:49 -08:00
George Staplin
82fd4d1708 XQuartz: xpr: Cleanup some of the code and possibly fix part of the GLX Pixmap problem.
Split DRICreateSurface into 3 functions.

Make CreateSurfaceForPixmap use xp_configure_surface.  I suspect this is partly why
GLXPixmaps never worked.

It will require some more work and thoughts for pbuffers, unless we fake those with
pixmaps and surfaces.
(cherry picked from commit 9cf264e677)
2009-01-30 16:44:49 -08:00
Jeremy Huddleston
9cbdcf1fa4 XQuartz: Only call DarwinUpdateModKeys when needed
Previously, we were calling it on almost every itteration through sendX11Event
(cherry picked from commit 6461729647)
2009-01-30 16:44:49 -08:00
George Staplin
037e52fd73 XQuartz: GL: Make indirect.c build and work in the 1.6 branch.
Reorder some header files and provide some types earlier on.

Remove the static __GLXextensionInfo __glDDXExtensionInfo; that isn't
used in 1.4 or 1.5, and seems to have been removed from 1.6.  Remove
the data structures associated with that too.

Remove __glXAquaDrawableResize.  The GLX structure doesn't use
it anymore, and the Apple version did nothing useful before.

__glXAquaDrawableSwapBuffers(): base no longer contains a drawGlxc
member.  Now provide the the Apple/Aqua context in the __GLXAquaDrawable
struct.  Add the context member to the __GLXAquaDrawable struct.

Remove the fallback configs.  They aren't used in 1.4 or 1.5 either.

Remove init_visuals().  It's not used in 1.4 or 1.5 either.

In the drawable constructor initialize the state properly, including
the new context member.

Remove glAquaResetExtension() -- it's not used anymore.

This has been tested remotely and proven to work with glxgears,
fire, various texture programs I wrote, and various Mesa demos.
(cherry picked from commit d514152195)
2009-01-30 16:44:49 -08:00
George Staplin
ee9736b26b XQuartz: GL: Set the __GLXconfig renderType to GLX_RGBA_BIT.
(cherry picked from commit 3c14546f58)
(cherry picked from commit a665ed16f7)
2009-01-30 16:44:49 -08:00
George Staplin
b646513861 XQuartz: GL: Make many more fbconfigs and visuals available for the 1.5 branch.
Use a __GLXconfig linked list struct to store the configurations for the
fbconfigs and visuals in a pGlxScreen.

Also, remove the __GLXvisualConfig/GlxSetVisualConfigs code that isn't used
anymore.  There is more code we can remove later, but I want to do that in
separate commits.
(cherry picked from commit 94162b0f8a)
(cherry picked from commit 15bb6abd59)
2009-01-30 16:44:49 -08:00
Alban Browaeys
cbd977cc15 Fix dmx compile on 1.6 branch.
http://www.mail-archive.com/pld-cvs-commit@lists.pld-linux.org/msg166742.html
contains a patch from "arekm" which I build upon to make up this one.

Mostly fixes for Xcalloc which I previously tried to fix the same way but
without finding the right spot.

I cannot tell if dmx works though. Only that it at least compile.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-12 10:57:11 -08:00
Jeremy Huddleston
ca21fd7ddf XQuartz: Add locking to make mieq thread safe on OSX
(cherry picked from commit 7a8d226686)
2009-01-12 10:42:11 -08:00
Jeremy Huddleston
671b71a6cb XQuartz: misc 1.6 updates (still --disable-glx)
rlAccel is not longer compatable, and it's not worth fixing
  Don't override DeviceCursorInitialize with a noop
  Don't do a SwitchCoreKeyboard (which wasn't even needed in the first place)
(cherry picked from commit c137f68168)
2009-01-12 10:42:05 -08:00
Jeremy Huddleston
681cc0f38b XQuartz: Use depth=24 instead of FatalError if we can't figure out our depth
(cherry picked from commit 80b65c5b78)
(cherry picked from commit 932ed6e949)
2009-01-12 10:41:51 -08:00
Jeremy Huddleston
7872669105 XQuartz: Make debugging output for invalid depths a bit more detailed
(cherry picked from commit 609fb166b7)
(cherry picked from commit 1962af7ee3)
2009-01-12 10:41:45 -08:00
Peter Hutterer
93e510d3ab xfree86: Only use the evdev ruleset on linux.
As suggested by Julien Cristau

This is an follow-up to
commit 9c5dd7337f
Author: Peter Hutterer <peter.hutterer@redhat.com>
Date:   Wed Dec 3 14:24:25 2008 +1000

    Let the DDX decide on the XkbRulesDefaults.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Acked-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit 13de7511b1)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-11 16:08:56 -08:00
Peter Hutterer
cc78f04b22 Let the DDX decide on the XkbRulesDefaults.
Rather than assuming rules in the CoreKeyboardProc, init the default rules in
InitCoreDevices, then re-use them later.

In the xfree86 DDX, set the rules to "base" or "evdev", depending on whether
we'll load kbd or evdev.

If we create a new MD, use pc105,us as default and re-use the rules file used
previously.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-11 16:08:35 -08:00
Peter Hutterer
1ffd9ec760 xfree86: don't restore the TTY mode if we didn't initialize it ourselves
Restoring it unconditionally means we restore to whatever tty_mode has as
default value (i.e. 0). K_RAW happens to be 0x00, so we always restore to raw
mode if allowEmptyInput is off.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit aea6f19f25)
2009-01-09 11:04:09 -08:00
Peter Hutterer
3c11efd7dc xfree86: If an input device failed to activate, return immediately.
Devices are only activated once - right after they've been added to the
server. If a device failes activation, it's dead. There's no reason to
continue. Return the error code from ActivateDevice() without setting up
sprite information or even sending a event to the client.

Then - in the DDX - just remove the device again.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 27011254c4)
2009-01-09 11:04:03 -08:00
Peter Hutterer
2ce48363b8 xfree86: don't call CheckMotion if a device hasn't been enabled. #19176
X.Org Bug <http://bugs.freedesktop.org/show_bug.cgi?id=19176>
(cherry picked from commit e1a3a1a0d8)
2009-01-09 11:03:58 -08:00
Jeremy Huddleston
2eb09af561 XQuartz: Use AvailabilityMacros.h instead of availability.h for Tiger
(cherry picked from commit 91f3c34357)
(cherry picked from commit 65ab2f44ea)
2009-01-09 11:03:32 -08:00
Jeremy Huddleston
fecc82ee11 XQuartz: Copyright Update... happy new year
(cherry picked from commit 9f1c26ae8d)
(cherry picked from commit df6ca888b0)
2009-01-09 11:03:27 -08:00
Jeremy Huddleston
d80e35a9ae XQuartz: pbproxy: Push dpy init and CFRunLoop hook setup into the pbproxy thread to avoid possible deadlock
(cherry picked from commit 49e59d32b8)
(cherry picked from commit adbfd49da2)
2009-01-09 11:03:21 -08:00
Jeremy Huddleston
c32a680f26 XQuartz: Don't use NX_SECONDARYFNMASK, NX_NUMERICPADMASK, NX_HELPMASK
We don't have keycodes for them, so don't try to use them
(cherry picked from commit cb912aca3a)
(cherry picked from commit 0676a580fc)
2009-01-09 11:03:05 -08:00