Commit Graph

8912 Commits

Author SHA1 Message Date
Dan Nicholson
c6e8637e29 xfree86: Support non-Option boolean entries in configuration
Refactored code into the parser to allow the freeform boolean types used
in Option entries to be used in other configuration entries. This isn't
as powerful as allowing "No" to precede the option names, but it atleast
gives a common handling of "yes", "no", etc.

A type xf86TriState has been added to support an optional boolean. This
allows the boolean sense of the value to be kept while providing a means
to signal that it is unset.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
2009-12-22 23:24:02 -08:00
Peter Hutterer
e1165632bd xfree86: Add Option AutoServerLayout for input devices.
Any input device with this option will be automatically added to whichever
server layout is selected at startup. This removes the need to reference a
device from the ServerLayout section. The two following configuration are
identical:

CONFIG 1:
    Section "ServerLayout"
            InputDevice "foo"
    EndSection

    Section "InputDevice"
            Identifier "foo"
            ...
    EndSection

CONFIG 2:
    Section "InputDevice"
            Identifier "foo"
            Option "AutoServerLayout" "on"
            ...
    EndSection

The selection of the server layout affects both explicitly specified
layouts and the implicit layout.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp at keithp.com>
2009-12-22 23:22:09 -08:00
Dan Nicholson
592b20c517 xfree86: Allow config directory to be specified on command line
Add a new command line parameter, -configdir, to specify the config
directory to be used. Rules are the same as -config for root vs. user
privileges.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
2009-12-22 23:20:52 -08:00
Dan Nicholson
efa5269f23 xfree86: Use xorg.conf.d directory for multiple config files
Currently there is a single file, xorg.conf, for configuring the server.
This works fine most of the time, but it becomes a problem when packages
or system services need to adjust the configuration. Instead, allow
multiple configuration files to live in a directory. Typically this will
be /etc/X11/xorg.conf.d.

Files with a suffix of .conf will be read and added to the server
configuration after xorg.conf. The server won't fall back to using the
auto configuration unless there is no config file and there are no files
in the config directory.

Right now this uses a simpler search template than the config file
search path by not using the command line or environment variable
parameters. The matching code was refactored a bit to make this more
coherent. Any DDX wanting to read the config files will need to call
xf86initConfigFiles before opening/reading them. This is to allow
xf86openConfigFile without xf86openConfigDirFiles and vice-versa.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
2009-12-22 23:20:45 -08:00
Dan Nicholson
f1e869aca1 xfree86: Unexport configuration file symbols
These functions should not be used outside of DDXs, so no need to put
them in the ABI.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
2009-12-22 23:20:20 -08:00
Peter Hutterer
90e6d93cf9 test/xi2: fail if xi2 class type is garbage. (#25492)
If the keycode range exceeds the allowable length, memory gets overwritten.
Catch this case by making sure that only allowed class types are
present.

X.Org Bug 25492 <http://bugs.freedesktop.org/show_bug.cgi?id=25492>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-22 21:30:52 -08:00
Peter Hutterer
72286eae9f xfree86: remove LAYOUT_DEBUG section.
I don't think this one has been in use since 2003.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-22 21:28:40 -08:00
Peter Hutterer
38b5afb0b5 xfree86: remove some 'enable this later' and if 0 ifdefs
2003 called, they want their ifdefs back.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-22 21:27:54 -08:00
Keith Packard
7dc78db79e Merge remote branch 'whot/master' 2009-12-22 21:25:18 -08:00
Julien Cristau
b44c9be244 test/xi2: fix maximum max_keycode (bug#25492)
The number of keycodes needs to be lower than 0xFFFD so that the length
field of xXIKeyInfo doesn't overflow.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-23 11:43:21 +10:00
Peter Hutterer
190610e0c6 xfree86: remove HistorySize from the xorg.conf man page.
This option isn't parsed by anything anymore.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2009-12-22 15:34:02 +10:00
Peter Hutterer
094c6b9f97 xfree86: reword InputDevice man sections, deprecate CorePointer/CoreKeyboard
Reshuffle and reword - InputDevice sections are only necessary if
hotplugging is disabled. Put more emphasis on hotplugging and less on HAL
since we'll switch backends eventually.

CorePointer, CoreKeyboard, and AlwaysCore should be listed as deprecated
since they don't do what they used to since 1.4. These days, only
SendCoreEvents matters and it's enabled for any driver calling
xf86ProcessCommonOptions (== every driver).
It only controls the startup behavior too, so document this.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-12-22 15:34:01 +10:00
Keith Packard
81a623f036 Bump to 1.7.99.3 (unreleased)
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-19 20:11:41 -08:00
Keith Packard
3c30c5b6d3 Set release date for 1.7.99.2
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18 22:58:59 -08:00
Alan Coopersmith
895f40792a Add type name argument to CreateNewResourceType
Convert all calls of CreateNewResourceType to pass name argument

Breaks DIX ABI.

ABI versions bumped:

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18 17:44:12 -08:00
Alan Coopersmith
a11c58fa0c Ensure all resource types created have names registered
Calls RegisterResourceName to record the type name for
use by X-Resource, XACE/SELinux/XTsol, and DTrace.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2009-12-18 16:51:45 -08:00
Alan Coopersmith
eb750f8b5e Check for failures from CreateNewResourceType
Make sure to check return value before setting bitmask flags.
For most calls, just fails to init the extension.   Since Xinput
already calls FatalError() on initialization failure, so does
failure to allocate Xinput's resource type.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2009-12-18 16:51:45 -08:00
Alan Coopersmith
1df4bd6011 Change default xkb model from pc104 to pc105
PC105 is a more useful default for non-American keyboard users,
not harmful for American PC101/PC104 keyboard users.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18 10:33:11 -08:00
Alan Coopersmith
1d2e189cdc Change sysconfdir brackets to avoid some shells trying to run it as a command
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18 10:32:32 -08:00
Alan Coopersmith
48749cc21b Add platform compatibility defines for Sun Studio compilers
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18 10:31:53 -08:00
Alan Coopersmith
b63912ed4c Convert checks for PC98 support from platform #ifdefs to configure flag
Default remains the same - on for most OS'es on i386 (except Solaris),
off for everyone else.   Can be manually toggled via --enable-pc98 or
--disable-pc98.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18 10:30:53 -08:00
Peter Hutterer
801bc8075a xfree86: update man page for special keys handling.
SpecialKeyHandling was removed from the kbd driver with version 1.4.0. Since
this is the only version that will build against server 1.7+ it's not
reasonable to mention it in the man page. Reword, point to XKB instead and
make clear that some key combinations _may_ not be available in any given
config.

Reported-by: Derek Fawcus
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-12-18 10:53:26 +10:00
Peter Hutterer
753310837c xfree86: DontZap has been disabled for a while now, say so in the man page.
1.7 always shipped with DontZap disabled, it's just the default keymaps that
may not include the symbol to trigger it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-12-18 10:53:26 +10:00
Keith Packard
0cb638dc68 Merge remote branch 'alanc/master' 2009-12-16 21:58:44 -08:00
Keith Packard
6a6a041c2d Merge remote branch 'jeremyhu/master' 2009-12-16 21:57:32 -08:00
Ville Syrjälä
8127465f44 xf86xv: Fix off-by-one in viewport clipping
Most of the Xv Put/Get operations have an off by one error in the
viewport clipping.

Apparently PutImage was fixed at some point but the same code was
already copy-pasted all over the place, and so the other operations
still suffer from the bug.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-16 21:53:18 -08:00
Peter Hutterer
faca1bc582 xfree86: belately init RandR12 if xinerama fails. (#24627)
On Fri, Dec 11, 2009 at 10:19:01AM -0800, Keith Packard wrote:
> On Wed, 9 Dec 2009 11:55:14 +1000, Peter Hutterer <peter.hutterer@who-t.net> wrote:
> > On Tue, Dec 08, 2009 at 05:24:06PM -0800, Aaron Plattner wrote:
> > > On Tue, Dec 08, 2009 at 03:52:27PM -0800, Peter Hutterer wrote:
> > > > Xorg +xinerama crashes immediately due to whacky dependency between Xinerama
> > > > and RandR12. The latter doesn't initialize if Xinerama is enabled, but if
> > > > only one screen is found, Xinerama is disabled again and RandR12 tries to
> > > > access data it never initialized.
>
> I'd sure like to have RandR get enabled when xinerama doesn't; is there
> an easy way of making that happen here? Perhaps having the RandR12 code
> disable Xinerama when only one screen is found? Or some other kludge?

you know the dependency better than I do so any hints are apreciated.
afaict, the screenInfo.numScreens (the check used by Xinerama) isn't
necessarily initialized at this point so we can't use the same check.
The following seems to work though:

From 670b3ebdb7312a6433a8f093d0820785db2aea20 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon, 14 Dec 2009 11:00:58 +1000
Subject: [PATCH] xfree86: if only one screen was found, disable Xinerama (#24627)

Xorg +xinerama crashes immediately due to whacky dependency between Xinerama
and RandR12. The latter doesn't initialize if Xinerama is enabled, but if
only one screen is found, Xinerama is disabled again and RandR12 tries to
access data it never initialized.

Dependency chain is:
- ProcessCommandLine sets noPanoramiXExtension to FALSE
- xf86RandR12Init() is a noop
- PanoramiXExtensionInit sets noPanoramiXExtension to TRUE
- xf86RandR12CreateScreenResources tries to use the devPrivates key it never
  initialized.

This hack checks if there's only one screen at the time RandR12 is
initialized. If so, we expect Xinerama to fail anyhow so we disable it
ourselves and proceed as planned.

X.Org Bug 24627 <http://bugs.freedesktop.org/show_bug.cgi?id=24627>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-16 21:50:00 -08:00
Tiago Vignatti
5f898ddbaa xfree86: fix -quiet option behaviour
Previously it was trying to set the same value as the default one. Sigh.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Acked-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-16 21:49:31 -08:00
Tiago Vignatti
7284e19861 os: print log markers only if log level is >= 0
FWIW default log verbosity is 0, so this will affect only if one start the
server with a different -verbose argument.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Acked-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-16 21:49:27 -08:00
Tiago Vignatti
f57240a0a8 xfree86: spam output but with verbose level checked instead
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Acked-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-16 21:49:22 -08:00
Alan Coopersmith
fbdf493a3e Add freetype & type1 to the LoadModules ignore list
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Adam Jackson <ajax@redhat.com>
2009-12-16 17:11:52 -08:00
Alan Coopersmith
c9726bbe31 Update Sun license notices to current X.Org standard form
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-16 17:11:35 -08:00
Jeremy Huddleston
d503195504 Xfake: Nuke -Wl,-undefined=InitExtensions from LDFLAGS
This is not portable, and accodring to Paulo should not be required any more.

Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-12-15 16:51:48 -08:00
Jeremy Huddleston
ed7d252719 dtrace: Add Xserver-dtrace.h to CLEANFILES
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-12-15 16:51:48 -08:00
Alan Coopersmith
44f102ed64 COPYING: Update license preamble
Update the comment about "a modification is currently under discussion"
since there hasn't been any such discussion for some time and this is
the consensus agreed upon preferred format.

Also throw in a pointer to the OSI discussion page about the MIT license.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-15 10:23:41 -08:00
Alan Coopersmith
00a7252fe3 Fix dtrace object builds of libos to link with SHA1_LIBS
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Adam Jackson <ajax@redhat.com>
2009-12-15 10:23:35 -08:00
Alan Coopersmith
dd2c83d03e Fix builds with --with-int10=stub
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Adam Jackson <ajax@redhat.com>
2009-12-15 10:23:16 -08:00
Adam Jackson
77221c9155 glx: swrast can do GLX 1.4 too
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-14 14:34:15 -08:00
Keith Packard
a72c65e917 fb: Adjust transform or composite coordinates for pixman operations
Windows (or even pixmaps, in some cases) may not sit at the origin of
the containing pixmap, so any coordinates relative to the drawable
must be adjusted. For destinations and untransformed sources, the
operation coordinates are adjusted. For transformed sources, the
transform matrix is adjusted.

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Soeren Sandmann <sandmann@daimi.au.dk>
2009-12-11 11:51:45 -08:00
Keith Packard
bd567061c8 Split fbGetDrawable into fbGetDrawablePixmap and fbGetPixmapBitsData
These two sub-macros each perform half of the original macro work and
the old macro is now implemented in terms of the new ones. This makes
way for new code which wants to know the underlying pixmap for a
window instead of just getting a pointer to the bits.

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Soeren Sandmann <sandmann@daimi.au.dk>
2009-12-11 11:51:28 -08:00
Keith Packard
6133505297 Revert "Fix clipping when windows are used as sources"
This reverts commit e9aa61e9f0.

Conflicts:

	fb/fbpict.c

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Soeren Sandmann <sandmann@daimi.au.dk>
2009-12-11 11:51:22 -08:00
Keith Packard
071b3c1810 Revert "Use IncludeInferiors when copying windows before compositing."
This reverts commit 7c7f0c2c6a.

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Soeren Sandmann <sandmann@daimi.au.dk>
2009-12-11 11:51:14 -08:00
Keith Packard
8e640d6b13 Revert "Reserve space for two GC values in copy_drawable()."
This reverts commit 08df24555c.

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Soeren Sandmann <sandmann@daimi.au.dk>
2009-12-11 11:51:00 -08:00
Keith Packard
0816c5482c Revert "fb: Don't crash if copy_drawable() returns NULL."
This reverts commit 66a9616d64.

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Soeren Sandmann <sandmann@daimi.au.dk>
2009-12-11 11:49:38 -08:00
Keith Packard
d3e054ac07 Merge remote branch 'jeremyhu/master' 2009-12-11 09:22:22 -08:00
Peter Hutterer
12fb31815d xkb: don't assign garbage value to led_return.
As the comment for the function states, led_return is undefined if map is
NULL. We might as well skip writing to it then.

Found by clang.

Reported-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2009-12-11 11:37:37 +10:00
Peter Hutterer
ea14a41821 Xi: reset device properties to NULL after deleting them. (#25374)
Commit 0e6cee853d introduced cleanup code to
remove the accel properties when switching schemes. The same code is
triggered by the default closedown code but only after unconditionally
removing all device properties (as part of the cleanup). The properties,
although deleted never got reset to NULL.

X.Org Bug 25374 <http://bugs.freedesktop.org/show_bug.cgi?id=25374>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Andy Furniss <lists@andyfurniss.entadsl.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2009-12-11 11:37:37 +10:00
Peter Hutterer
9ac6a048ef xfree86: remove unused variable in configureDDMonitorSection.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2009-12-11 11:37:37 +10:00
Julien Cristau
3fad969a90 Move config_init() after CreateWellKnownSockets() and InitCoreDevices()
config_init() can now add devices directly instead of scheduling a
timer.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-11 11:37:36 +10:00
Tomas Carnecky
8861407878 Fix possible NULL dereference in XkbFlushLedEvents()
Through some code paths it is possible that NULL is being passed in the
'ed' parameter to XkbFlushLedEvents(). Make sure we don't pass it along
to bzero().

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-11 11:37:36 +10:00