Commit Graph

10135 Commits

Author SHA1 Message Date
Peter Hutterer
9db9e964f6 xfree86: swap the order to-be-merged lists in xf86CollectInputOptions.
Current order causes the user-configured option list to be overwritten with
the default list supplied by the driver. Swap around so we overwrite the
driver's default values instead.

This only affected options supplied by the driver such as XkbLayout in the
case of evdev.

Reported-by: Sebastian Glita <glseba@yahoo.com>
Reported-by: Simon Thum <simon.thum@gmx.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: Sebastian Glita <glseba@yahoo.com>
2010-12-13 09:57:59 +10:00
Peter Hutterer
0d440a1c6e dix: allow for button-only input devices (#21457)
Add a few checks for the existence of a valuator class on the device to
avoid null-pointer dereferences for button events from devices without a
valuator class.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-10 10:57:55 +10:00
Jeremy Huddleston
f641e4b34a XQuartz GL: Add $(GL_CFLAGS) to CFLAGS
This fixes a build failure I found on tinderbox.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-08 22:58:12 -08:00
Peter Hutterer
9cf055892d xfree86: don't set movement flags for non-valuator events.
If a device doesn't send valuators, don't try to move its position.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-09 10:03:26 +10:00
Peter Hutterer
aba8133c9c dix: clear up an overly convoluted if statement.
No functional changes, just improves readability. This statement had things
added to/removed from it for a few server releases while the input event
queue was revamped. What made sense once is now mainly confusing.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-09 10:03:26 +10:00
Jeremy Huddleston
883039e07b XQuartz: Just NSBeep() for XBell()
The CoreAudio path uses deprecated API and has reported crashes that
aren't worth fixing (4e8bf12b13 fixed
one and introduced another).  NSBeep() does the job just fine.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-08 13:57:19 -08:00
Jon TURNEY
2c70b650b3 Fix Xwin build after af0f9f91
Fix damage to XWIN_LIBS in commit af0f9f9133
"Move some sync code to miext", which broke the XWin build

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-08 11:48:21 -08:00
Keith Packard
519d243f0c Merge remote branch 'alanc/master' 2010-12-07 13:39:58 -08:00
Alan Coopersmith
446482efaa Convert cvt code to use XNFasprintf()
Requires linking xprintf.c into standalone cvt utility

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-12-07 11:10:36 -08:00
Alan Coopersmith
d2c42b1027 Replace alloc+strcpy+strcat with asprintf() & XNFasprintf() calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
Alan Coopersmith
3a9bb93dd1 Convert alloc+sprintf pairs into asprintf() & XNFasprintf() calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
Alan Coopersmith
2416255f7e Convert hw/xfree86/parser code to use asprintf() calls
Requires linking xprintf.c into libxf86config for those who build it.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
Alan Coopersmith
03e8bfa1d1 Convert existing Xprintf style calls to asprintf style
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
Alan Coopersmith
c95c1d338f Add asprintf() implementation for platforms without it
Provides a portable implementation of this common allocating sprintf()
API found in many, but not yet all, of the platforms we support.
If the platform provides vasprintf() we simply wrap it, otherwise we
implement it - either way callers can use it regardless of platform.

Since not all platforms guarantee to NULL out the return pointer on
failure, we don't either, and require callers to check the return
value for -1.

The old Xprintf() API is deprecated, but left for compatibility for now.

The new API is added in a new header so that it can be used in parts of
the server such as hw/xfree86/parser that don't include all the server
headers.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
Alan Coopersmith
2db6951763 Sun's copyrights now belong to Oracle
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
Alan Coopersmith
f06e8a61d6 Move inclusion of panoramiX headers to top of render.c
Fixes compiler error from Sun compilers due to _X_EXPORT declaration
being included after the unlabeled version:

"../Xext/panoramiXsrv.h", line 29: redeclaration must have the same or more restrictive linker scoping: XRT_PICTURE

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-12-07 11:10:35 -08:00
Cyril Brulebois
9f9c732311 dix: Fix logic for displaying deprecation warning only once.
As pointed out by Jamey Sharp (again), the logic is faulty: --warn is
always going to be false. Replace it with warn-- accordingly, so that
there's (at least, but also only) one warning showing up.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-07 18:42:45 +01:00
Cyril Brulebois
a937803c1f dix: Simplify deprecated *Lookup* wrappers around dixLookup*.
As pointed out by Jamey Sharp: “the result pointer is already guaranteed
to be NULL if the return value is not Success”, so get rid of the
variable used to catch the return value, and used in a ternary operation
to decide whether to return the pointer or NULL. Always return the
result pointer instead.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-07 18:42:45 +01:00
Cyril Brulebois
73fbc4a4a7 Replace SecurityLookupIDByClass() with dixLookupResourceByClass().
This patch has been prepared with the following Coccinelle semantic patch:

@@
expression a, b, c, d;
identifier r;
type t;
@@
-r = (t) SecurityLookupIDByClass(a, b, c, d);
+dixLookupResourceByClass((pointer*) &r, b, c, a, d);

The only occurrence not matching directly was processed after separating
declaration of pXinDraw and call to SecurityLookupIDByClass().

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-07 18:42:45 +01:00
Cyril Brulebois
6e8b34b704 Replace SecurityLookupIDByType() with dixLookupResourceByType(), take 2.
These occurrences are a bit harder to catch through a semantic patch,
so process them “manually”.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-07 18:42:44 +01:00
Cyril Brulebois
ac04c1377a Replace SecurityLookupIDByType() with dixLookupResourceByType(), take 1.
This patch has been prepared with the following Coccinelle semantic patch:

@@
expression a, b, c, d;
identifier r;
@@
-r = SecurityLookupIDByType(a, b, c, d);
+dixLookupResourceByType((pointer*) &r, b, c, a, d);

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-07 18:42:44 +01:00
Cyril Brulebois
28b4c02d74 Enable silent rules for cat and echo.
One gets this:
|   GEN    lf3-xaaBitmap.c
|   GEN    lf3-xaaBitmap.c
|   GEN    lf3-xaaBitmap.c
|   GEN    lf3-xaaBitmap.c
|   CC     lf3-xaaBitmap.lo

instead of this:
| echo "#define LSBFIRST" > l3-xaaBitmap.c
| echo "#define TRIPLE_BITS" >> l3-xaaBitmap.c
| echo '#include "../../../../hw/xfree86/xaa/xaaBitmap.c"' >> l3-xaaBitmap.c
|   CC     l3-xaaBitmap.lo

Occurrences found using:
| git grep -E '(cat|echo)' -- '*Makefile.am'

Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-07 18:42:44 +01:00
Cyril Brulebois
838b958228 Replace LookupIDByType() with dixLookupResourceByType(), take 2.
These occurrences are a bit harder to catch through a semantic patch,
so process them “manually”.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-07 18:42:44 +01:00
Cyril Brulebois
ffb93533fd Replace LookupIDByType() with dixLookupResourceByType(), take 1.
This patch has been prepared with the following Coccinelle semantic patch:

@@
expression x, y;
type t;
identifier r;
@@
-r = (t) LookupIDByType(x, y);
+dixLookupResourceByType((pointer*)&r, x, y, NullClient, DixUnknownAccess);

@@
expression x, y;
type t;
identifier r;
@@
-t r = (t) LookupIDByType(x, y);
+t r;
+dixLookupResourceByType((pointer*)&r, x, y, NullClient, DixUnknownAccess);

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-07 18:42:44 +01:00
Cyril Brulebois
d1b45b0fd5 Fix missing <string.h> include.
The following happens otherwise (with -Wall -Werror):
| In file included from /usr/include/X11/Xfuncs.h:47,
|                  from ../../include/misc.h:112,
|                  from ../../include/screenint.h:52,
|                  from ../../include/scrnintstr.h:52,
|                  from ../../dix/cursor.c:58:
| /usr/include/string.h:534: error: conflicting types for ‘xstrcasecmp’
| ../../include/os.h:488: note: previous declaration of ‘xstrcasecmp’ was here
| /usr/include/string.h:538: error: conflicting types for ‘xstrncasecmp’
| ../../include/os.h:493: note: previous declaration of ‘xstrncasecmp’ was here

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-07 18:42:43 +01:00
Cyril Brulebois
780754050b Fix GLX_LIBS vs. DMX_LIBS order.
If glxproxy needs symbols which aren't pulled in by dmx itself, glxproxy
fails to link because of undefined references.

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-07 09:24:16 -08:00
Keith Packard
14983286c4 Version bumped to 1.9.99.901 (1.10 RC1)
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-06 20:45:35 -08:00
James Jones
d96d5f5443 Bump extension ABI to 5
Commit 606e079cc4 moved the visual
field in WindowOptRec, breaking the extension module ABI.

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-06 20:43:15 -08:00
Keith Packard
435361bd73 sync: syncObject may be None in SyncInitTrigger
And often is, especially when called from ProcSyncCreateAlarm.
Crashing in this case seems unwise.

Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-06 20:38:14 -08:00
Keith Packard
0d01b66df9 randr: handle RRSetCrtcConfigs request with zero configs
Need to actually return a reply in this case.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:09:11 -08:00
Keith Packard
b0f4bd61f0 ProcRRSetCrtcConfigs uses 'configs' without being initialized
If the client sends invalid data for this request, the server
will jump to 'sendReply' and call RRFreeCrtcConfigs, passing it the
uninitialized 'configs' and 'num_configs' values.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:09:08 -08:00
Keith Packard
752c368421 Separate out screen size and screen pixmap sizes in RRScreenSizeSet
This provides for separate sizes for the screen scanout and rendering
buffer and the application-visible screen size.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:09:04 -08:00
Keith Packard
a88d70fb20 Set sprite transforms from RRSetCrtcConfigs
These were getting ignored.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:58 -08:00
Keith Packard
96b4d4787b DIX is responsible for ref counting scanout pixmaps.
Remove some extra ref counting inside hw/xfree86/modes

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:54 -08:00
Keith Packard
afb6ebf1d5 randr: Hook up the new RandR 1.4 functionality
This bumps the supported RandR protocol version and adds the dispatch
hooks needed to call the new functions

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:52 -08:00
Keith Packard
82612045e1 randr: Add per-crtc pixmaps
This adds new driver hooks to allocate scanout pixmaps and
changes the mode setting APIs to pass the new scanout pixmaps
along from DIX. DIX is responsible for reference counting the pixmaps
by tracking them through RRCrtcNotify.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:48 -08:00
Keith Packard
86c489c319 hw/xfree86/modes: Add optional driver API for RRSetCrtcConfigs
This provides a driver hook which can either completely replace, or
just validate the parameters for, the RRSetCrtcConfigs request.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:46 -08:00
Keith Packard
d94a035ea9 randr: Implement RRSetCrtcConfigs
This provides a driver-independent implementation of the
RRSetCrtcConfigs API by simply using the existing interfaces.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:43 -08:00
Keith Packard
66294afcab randr: Add sprite position transforms
This implements sprite position transformations. Sprite image
transforms are passed all the way to the DDX layer, but the images are
not yet manipulated before being passed to the drivers.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:40 -08:00
Keith Packard
c8bc25fd76 Require RandR protocol version 1.4 or newer
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-06 20:08:34 -08:00
Keith Packard
8b35118c03 Replace huge argument list in xf86CrtcSetModeTransform with struct
xf86CrtcSetModeTransform was starting to get ridiculous with 6
arguments, this change has it take a single structure that contains
all of those values along with a set of flags that says which have
changed.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:18 -08:00
Keith Packard
f5b8bd620f Merge remote branch 'jajones/for-keith' 2010-12-06 19:51:06 -08:00
Keith Packard
01e9fa7da3 Merge remote branch 'whot/for-keith' 2010-12-06 19:45:11 -08:00
Gaetan Nadon
79870dbf72 config: build Xserver man pages using XORG_MANPAGE_SECTIONS
Nothing requires the use of a C preprocessor
Using standard file exentions (.man) means no need for .gitignore
Use standard directory and makefile
Fix man page whitespace issues

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Dew <matt@osource.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-06 19:30:19 -08:00
Keith Packard
c4a7a5917a Merge remote branch 'jeremyhu/master' 2010-12-06 19:28:07 -08:00
Keith Packard
5de312a60d Merge remote branch 'alanc/master' 2010-12-06 19:22:52 -08:00
James Jones
8127c83c81 Expose Sync Fence Object protocol
Add the new protocol handlers for XSync 3.1 to the
dispatch tables and report support for Sync protocol
version 3.1.

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06 19:15:38 -08:00
James Jones
9c0c7cc9a7 Add XSyncAwaitFence() handler
-Add the actual ProcSyncAwaitFence() dispatch func

-Add support for fence sync triggers.

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06 19:15:38 -08:00
James Jones
397dfd9f87 Create/Destroy/Trigger/Reset/Query Fence Sync objs
Initial server side implementation of fence sync
objects.  Allows creation, management, and state
queries of binary state objects.  Currently they
are not very useful as there is no way to wait for
them efficiently.

The basic trigger operation added here triggers
relative to a given X screen's rendering operations.
To perform this operation, fence sync objects must
be tied to a screen.  As Aaron Plattner pointed out,
screens are identified but a drawable in X protocol,
so a drawable argument is included in
XSyncCreateFence().  The screen also could have been
specified as part of the trigger operation.  However,
it is also desireable to associate a screen with
fence sync objects at creation time so that the
associated screen's driver can allocate any HW-
specific resources needed by the fence object up
front.

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06 19:15:38 -08:00
James Jones
53ea965d64 Require xextproto 7.1.99
Subsequent changes rely on fence sync protocol
in the sync extension.  This protocol is only
complete in xextproto version 7.1.99 and
above.

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06 19:15:38 -08:00