Commit Graph

9209 Commits

Author SHA1 Message Date
Jamey Sharp
35761d5f81 Introduce dixLookupFontable for "FONT or GC" parameters.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-07 21:56:36 -07:00
Alan Coopersmith
2eab697adb Constify function prototypes in auth & xdmcp code
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Tested-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-07 12:22:58 -07:00
Matthias Hopf
e2e2747f40 Fix mod() definition.
Presumably no implications, especially security-wise.

Signed-off-by: Matthias Hopf <mhopf@suse.de>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-07 12:22:02 -07:00
Adam Tkac
626f97688a Export XkbCopyDeviceKeymap from Xorg, it is needed by VNC.
Signed-off-by: Adam Tkac <atkac@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-07 12:17:45 -07:00
Chris Humbert
21ed660f30 dix: make DeviceEvent coordinates signed for Xinerama. #24986
With Xinerama enabled, event coordinates are relative to Screen 0, so
they can be negative.  The new DeviceEvent's coordinates are of type
uint16_t, making screens above and to the left of Screen 0 unusable.

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

Signed-off-by: Chris Humbert <freedesktop@mahadri.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-07 12:17:22 -07:00
Peter Hutterer
9802839d35 Xi: reset the known properties at the end of the server generation.
Properties allocated through XIGetKnownProperty() aren't reset on the second
server generation but keep the old value. As a result, wrong Atoms are
supplied to the driver, resulting in potential data corruption or weird
error message.

Reproducible by running "xlsatom | grep FLOAT" twice on a plain X server.
The second X server generation won't have the FLOAT atom defined anymore,
despite the users of this atom not noticing any errors.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-07 12:16:43 -07:00
Julien Cristau
72758287f7 XQuartz: add new localization files to EXTRA_DIST
commit 206531f75c added localization files
for ar, add them to the Makefile.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-05-04 13:08:16 -07:00
Keith Packard
a3f5d30ba6 Make sure XFixes invisible cursor gets freed on server reset
This uses the same hack that dix uses for the rootCursor -- allocate
a resource ID for the invisible cursor so that it gets freed at reset
time. This also allows us to unconditionally create it during
extension initialization; necessary as the privates layout may well be
different on subsequent generations.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-03 10:27:35 -07:00
Keith Packard
cdeb2c23f8 Fix cursor ref counting mistakes with sprites and xf86Cursor.c
A few cursor value assignments weren't getting correctly ref counted,
causing leaks of cursor objects.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-03 10:26:52 -07:00
Keith Packard
a80b1f888f Merge remote branch 'jeremyhu/master' 2010-05-02 16:35:17 -07:00
Jeremy Huddleston
0efd7b8d82 XQuartz GLX: Change around includes for better compatability with different OS versions
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-05-02 15:27:29 -07:00
Jeremy Huddleston
7b506fdc84 rootless: Add some sanity checking to miPaintWindow
This avoids painting the root window when it isn't actually drawable.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-05-02 15:27:29 -07:00
Jeremy Huddleston
4d3789c9b3 rootless: Remove an unneeded comment
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-05-02 15:27:29 -07:00
Oliver McFadden
048d15192a x-list.c: null-returning function malloc() was called without checking
Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-05-02 15:27:29 -07:00
Tiago Vignatti
4971099860 dix: wrap variables with #ifdef when panoramix is not used
this shut up some warnings.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-02 13:55:16 -07:00
Keith Packard
40858960c0 Delete loop with no effect from GlyphUninit
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-04-30 13:05:45 -07:00
Keith Packard
65e961fcc1 Replace some input devPrivates with regular struct fields
In the process, fixes a memory leak in CloseDevice, and an unchecked
memory allocation in InitializePredictableAccelerationProperties.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-04-30 13:05:11 -07:00
Keith Packard
998e982b77 Move callback definitions to their own file
Needed as the privates stuff uses the callbacks before they would have
been defined in dix.h

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-04-30 13:04:44 -07:00
Keith Packard
7dde50c649 Move X_DEPRECATED to misc.h so it can be used outside resource.h
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-04-30 12:50:31 -07:00
Aaron Plattner
5623908aee dix: Improve documentation of the DIX private data functions.
The functions exported by the devPrivates code were poorly documented.  I tried
to spruce it up a little.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-30 12:46:04 -07:00
Keith Packard
986d46144b Merge remote branch 'jamey/for-keith'
Conflicts:
	hw/xfree86/common/xf86xv.c
2010-04-30 12:40:53 -07:00
Keith Packard
a974c8e7cb Merge remote branch 'whot/for-keith' 2010-04-30 12:33:00 -07:00
Keith Packard
6581bc4591 Merge remote branch 'yselkowitz/master' 2010-04-30 12:29:52 -07:00
Keith Packard
0e91e19f78 Merge remote branch 'vignatti/for-keith' 2010-04-30 12:27:51 -07:00
Peter Hutterer
02e86221b8 xfree86: a missing input driver is not an error.
We call NIDR on all devices that make it through the config backend.
Including some that have no driver assigned to them (/dev/input/mouse0 for
example). Those ones then simply get ignored by NIDR, but this should not be
noted as an error in the log file.

X_INFO is sufficient, and it may just prevent some bugreports.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-04-30 11:33:25 +10:00
Jon TURNEY
81a081c1f0 Cygwin/X: AIGLX using native WGL
A rewrite of the XWin DDX AIGLX code to actually make it do something useful again

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-04-28 14:26:52 +01:00
Rami Ylimäki
262c2c9031 test: Fix linking of wrapped functions in XI2 tests.
Running "make check" will lead to build problems in
scratchbox. Building the first test that wraps dixLookupWindow fails
because symbol __real_dixLookupWindow can't be resolved. Defining
wrapping options as linker options instead of compiler options makes
everything build nicely in scratchbox.

Signed-off-by: Rami Ylimäki <ext-rami.ylimaki@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-28 15:42:43 +10:00
Adam Jackson
ffaae7c0c6 Remove mibank support
Banked framebuffers are so 1990.  As of 7.4 the only drivers remaining
that used this were chips, neomagic, trident, and vesa.  vesa only used
it when not using shadowfb, which is broadly undesirable anyway, and no
longer uses it at all as of 2.3.0.  neomagic never used it by default,
and support for it is gone in git master.  The other two effectively
only ever used it for ISA chips; since ISA support is now gone from
the server, they have been modified to only compile mibank support when
ISA support is available.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-27 11:14:03 -07:00
Jamey Sharp
b5b8f91b82 xfree86: use screen privates for Xv offscreen images.
This replaces a globally-allocated array that depended on MAXSCREENS.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-04-27 11:03:01 -07:00
Jamey Sharp
a1c2acfe79 xfree86: use screen privates for exclusive DGA clients.
Most DGA requests allow at most one client to be using DGA on each
screen. Instead of keeping track of the current client in a
MAXSCREEN-sized array, track it in a per-screen private.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-04-27 11:02:37 -07:00
Jamey Sharp
f9e3a2955d Make Xvfb independent of MAXSCREENS.
If a -screen option specifies a screen number higher than any previously
specified, reallocate the vfb-private array of screen-info structs.

If built with a DIX that still has a MAXSCREENS limit, asking for too
many screens won't be detected until InitOutput calls AddScreen.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-04-27 10:14:42 -07:00
Jamey Sharp
20e84b0b44 Xvfb: Simplify screen option processing.
Inspired by Jon Turney's "Xwin: Simplify screen option processing"
patch, which does something similar for the Xwin server.

Besides making the code more readable, this eliminates most of Xvfb's
references to MAXSCREENS.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-04-27 10:14:21 -07:00
Jamey Sharp
eeb8454755 Delete redundant scrnum field from Xvfb private screen-info struct.
The screen number can be inferred from the position in the vfbScreens
array, and it was only used in two places, so it was hardly important.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-04-27 10:14:05 -07:00
Jamey Sharp
da02178919 Track screens' installed colormaps as screen privates.
Several DDXes allow each screen to have at most one (or in some cases,
exactly one) installed colormap. These all use the same pattern: Declare
a global-lifetime array of MAXSCREENS ColormapPtrs, and index it by
screen number. This patch converts most of those to use screen privates
instead.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-04-27 10:13:47 -07:00
Jamey Sharp
22c4300ee2 Simplify XineramifyXv.
The structure of the adaptor-matching algorithm was obscured by trying
to use "continue" and "break" as the only control-flow primitives. It's
a lot more clear if you add "return" to that set.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-04-27 10:07:09 -07:00
Peter Hutterer
af170a4ab7 Xext: only update the sprite on pointer events.
A call to miPointerUpdateSprite for the XTEST keyboard may result in a
NULL pointer dereference in miDCPutUpCursor() when the save buffer is NULL.

XTS test case: Xlib 11 KeymapNotify

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-27 15:50:26 +10:00
Dirk Wallenstein
bac1c5f1be xkb: Fix omissions in geometry initialization #27679
_XkbCopyGeom did not copy all of the data from the source geometry. This
resulted in failures when trying to obtain the keymap from a server
where the default geometry has not been replaced by a custom
configuration.

Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-27 15:50:26 +10:00
Keith Packard
3f63db8919 Merge remote branch 'jamey/for-keith' 2010-04-26 20:18:13 -07:00
Pierre-Loup A. Griffais
41bdb6c003 xf86: Don't crash when switching modes through RandR without owning the VT.
While VT-switched, FB access is disabled and should remain so. Trying to switch
modes in that state would re-enable it, potentially causing crashes if trying
to access it before the driver has recovered from the mode switch.

Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-26 20:15:17 -07:00
Adam Jackson
2a763c9023 dix: Default DPMS timeout values to match screensaver values
These have the same default, but if you specify something different with
-s on the command line, only the screensaver time is changed.  As DPMS
is usually what's desired, change it to match.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-26 20:04:39 -07:00
Pierre-Loup A. Griffais
518f3b189b mi: don't thrash resources when displaying the software cursor across screens
This changes the DC layer to maintain a persistent set of GCs/pixmaps/pictures
for each pScreen instead of failing to thrash between them when changing
screens.

Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-26 19:40:12 -07:00
Jamey Sharp
54e51de8cd ProcGrabButton: remove redundant error check.
If dixLookupResourceByType did not return Success, it will have set the
pointer to NULL, so the second if will always be true.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-04-26 19:24:25 -07:00
Jamey Sharp
7e573b5ccd Kill unused/useless macros in panoramiX.h: BREAK_IF, IF_RETURN, FORCE_ROOT
This header doesn't seem to be used outside the server tree, so I don't
think anything was depending on these except what I've fixed in this
patch.

FORCE_ROOT is not used anywhere, and never has been in all the history
that's in git. ajax removed its FORCE_WIN and FORCE_CMAP companions
three years ago, in 04b87d6dfa.

BREAK_IF and IF_RETURN expanded to exactly the keywords in their names,
which is silly. They were rarely used and served only to make callers
inconsistent with the idioms used elsewhere in the server.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-04-26 19:19:02 -07:00
Jamey Sharp
e372cc58e0 Boolean-or short-circuits, so (a || (!a && ...)) is redundant. Simplify.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-04-26 19:18:41 -07:00
Keith Packard
25d1c6cd37 Exa screen private has SavedSourceValidate, not SourceValidate
Need to check the right field to see if there is a wrapped
SourceValidate function.

Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-26 11:04:38 -07:00
Yaakov Selkowitz
d073e51bee Clarify help strings for disabled features in configure
Features which are disabled by default use the --enable-* syntax to show
how they need to be passed to override the default.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2010-04-26 11:39:19 -05:00
Yaakov Selkowitz
57409af126 Catch when requested SHA1 implementation is missing
The other SHA1 implementation detections already error out if
specifically requested but were not found.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-04-26 11:38:37 -05:00
Yaakov Selkowitz
0d8fe2fe5c Prefer libsha1 over libgcrypt
When no SHA1 implementation is specified, we should first prefer
system-builtin solutions (libc/libmd/CommonCrypto), then smaller
implementations over the larger ones.  libsha1 is much smaller than
libgcrypt, so it should be first.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Acked-by: Julien Cristau <jcristau@debian.org>
2010-04-26 11:35:56 -05:00
Yaakov Selkowitz
65a2c09549 Revert "Disable Record by default."
Record was broken during the pre-1.6 development cycle and was not fixed
until 1.7.6.  Now that it is fixed, re-enable it by default.

This reverts commit 3eaecdd66e.

Conflicts:

	configure.ac

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-26 11:35:55 -05:00
Yaakov Selkowitz
6e0d847c27 xfree86: Fix reference to SGML entities
XORG_CHECK_LINUXDOC sets the SGML search path to the parent of X11/defs.ent.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Acked-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: Gaetan Nadon <memsize@videotron.ca>
2010-04-26 11:35:53 -05:00