meego-developer-tools:meego-simulator-xephyr.git
7 years agoFix mod() definition.
Matthias Hopf [Fri, 7 May 2010 16:46:30 +0000 (18:46 +0200)]
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>
7 years agoExport XkbCopyDeviceKeymap from Xorg, it is needed by VNC.
Adam Tkac [Fri, 7 May 2010 07:02:03 +0000 (17:02 +1000)]
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>
7 years agodix: make DeviceEvent coordinates signed for Xinerama. #24986
Chris Humbert [Fri, 7 May 2010 07:02:43 +0000 (17:02 +1000)]
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>
7 years agoXi: reset the known properties at the end of the server generation.
Peter Hutterer [Fri, 7 May 2010 06:22:12 +0000 (16:22 +1000)]
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>
7 years agoXQuartz: add new localization files to EXTRA_DIST
Julien Cristau [Tue, 4 May 2010 13:15:02 +0000 (15:15 +0200)]
XQuartz: add new localization files to EXTRA_DIST

commit 206531f75cd41c034e89fdfbc75ab0910682eef8 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>
7 years agoMake sure XFixes invisible cursor gets freed on server reset
Keith Packard [Fri, 30 Apr 2010 23:10:32 +0000 (16:10 -0700)]
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>
7 years agoFix cursor ref counting mistakes with sprites and xf86Cursor.c
Keith Packard [Fri, 30 Apr 2010 19:18:09 +0000 (12:18 -0700)]
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>
7 years agoMerge remote branch 'jeremyhu/master'
Keith Packard [Sun, 2 May 2010 23:35:17 +0000 (16:35 -0700)]
Merge remote branch 'jeremyhu/master'

7 years agoXQuartz GLX: Change around includes for better compatability with different OS versions
Jeremy Huddleston [Tue, 27 Apr 2010 20:14:47 +0000 (13:14 -0700)]
XQuartz GLX: Change around includes for better compatability with different OS versions

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
7 years agorootless: Add some sanity checking to miPaintWindow
Jeremy Huddleston [Wed, 21 Apr 2010 15:38:53 +0000 (08:38 -0700)]
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>
7 years agorootless: Remove an unneeded comment
Jeremy Huddleston [Sun, 18 Apr 2010 08:22:27 +0000 (01:22 -0700)]
rootless: Remove an unneeded comment

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
7 years agox-list.c: null-returning function malloc() was called without checking
Oliver McFadden [Thu, 22 Apr 2010 07:29:44 +0000 (10:29 +0300)]
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>
7 years agodix: wrap variables with #ifdef when panoramix is not used
Tiago Vignatti [Sun, 2 May 2010 16:14:39 +0000 (19:14 +0300)]
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>
7 years agoDelete loop with no effect from GlyphUninit
Keith Packard [Thu, 29 Apr 2010 19:24:51 +0000 (12:24 -0700)]
Delete loop with no effect from GlyphUninit

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
7 years agoReplace some input devPrivates with regular struct fields
Keith Packard [Thu, 29 Apr 2010 19:24:49 +0000 (12:24 -0700)]
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>
7 years agoMove callback definitions to their own file
Keith Packard [Thu, 29 Apr 2010 19:24:48 +0000 (12:24 -0700)]
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>
7 years agoMove X_DEPRECATED to misc.h so it can be used outside resource.h
Keith Packard [Thu, 29 Apr 2010 19:24:47 +0000 (12:24 -0700)]
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>
7 years agodix: Improve documentation of the DIX private data functions.
Aaron Plattner [Wed, 28 Apr 2010 19:37:08 +0000 (12:37 -0700)]
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>
7 years agoMerge remote branch 'jamey/for-keith'
Keith Packard [Fri, 30 Apr 2010 19:40:53 +0000 (12:40 -0700)]
Merge remote branch 'jamey/for-keith'

Conflicts:
hw/xfree86/common/xf86xv.c

7 years agoMerge remote branch 'whot/for-keith'
Keith Packard [Fri, 30 Apr 2010 19:33:00 +0000 (12:33 -0700)]
Merge remote branch 'whot/for-keith'

7 years agoMerge remote branch 'yselkowitz/master'
Keith Packard [Fri, 30 Apr 2010 19:29:52 +0000 (12:29 -0700)]
Merge remote branch 'yselkowitz/master'

7 years agoMerge remote branch 'vignatti/for-keith'
Keith Packard [Fri, 30 Apr 2010 19:27:51 +0000 (12:27 -0700)]
Merge remote branch 'vignatti/for-keith'

7 years agoxfree86: a missing input driver is not an error.
Peter Hutterer [Wed, 28 Apr 2010 23:48:37 +0000 (09:48 +1000)]
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>
7 years agoCygwin/X: AIGLX using native WGL
Jon TURNEY [Sat, 7 Nov 2009 19:28:18 +0000 (19:28 +0000)]
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>
7 years agotest: Fix linking of wrapped functions in XI2 tests.
Rami Ylimäki [Tue, 27 Apr 2010 11:04:47 +0000 (14:04 +0300)]
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>
7 years agoRemove mibank support
Adam Jackson [Tue, 27 Apr 2010 03:11:31 +0000 (20:11 -0700)]
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>
7 years agoxfree86: use screen privates for Xv offscreen images.
Jamey Sharp [Fri, 23 Apr 2010 04:35:17 +0000 (21:35 -0700)]
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>
7 years agoxfree86: use screen privates for exclusive DGA clients.
Jamey Sharp [Thu, 22 Apr 2010 01:05:45 +0000 (18:05 -0700)]
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>
7 years agoMake Xvfb independent of MAXSCREENS.
Jamey Sharp [Tue, 27 Apr 2010 01:23:27 +0000 (18:23 -0700)]
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>
7 years agoXvfb: Simplify screen option processing.
Jamey Sharp [Tue, 27 Apr 2010 01:09:23 +0000 (18:09 -0700)]
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>
7 years agoDelete redundant scrnum field from Xvfb private screen-info struct.
Jamey Sharp [Tue, 27 Apr 2010 01:04:25 +0000 (18:04 -0700)]
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>
7 years agoTrack screens' installed colormaps as screen privates.
Jamey Sharp [Thu, 22 Apr 2010 05:26:28 +0000 (22:26 -0700)]
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>
7 years agoSimplify XineramifyXv.
Jamey Sharp [Wed, 7 Oct 2009 16:00:02 +0000 (09:00 -0700)]
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>
7 years agoXext: only update the sprite on pointer events.
Peter Hutterer [Wed, 21 Apr 2010 05:51:20 +0000 (15:51 +1000)]
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>
7 years agoxkb: Fix omissions in geometry initialization #27679
Dirk Wallenstein [Sat, 17 Apr 2010 19:36:23 +0000 (21:36 +0200)]
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>
7 years agoMerge remote branch 'jamey/for-keith'
Keith Packard [Tue, 27 Apr 2010 03:18:13 +0000 (20:18 -0700)]
Merge remote branch 'jamey/for-keith'

7 years agoxf86: Don't crash when switching modes through RandR without owning the VT.
Pierre-Loup A. Griffais [Thu, 22 Apr 2010 01:11:05 +0000 (18:11 -0700)]
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>
7 years agodix: Default DPMS timeout values to match screensaver values
Adam Jackson [Mon, 15 Feb 2010 21:54:35 +0000 (16:54 -0500)]
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>
7 years agomi: don't thrash resources when displaying the software cursor across screens
Pierre-Loup A. Griffais [Wed, 21 Apr 2010 23:46:17 +0000 (16:46 -0700)]
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>
7 years agoProcGrabButton: remove redundant error check.
Jamey Sharp [Sun, 25 Apr 2010 06:07:47 +0000 (23:07 -0700)]
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>
7 years agoKill unused/useless macros in panoramiX.h: BREAK_IF, IF_RETURN, FORCE_ROOT
Jamey Sharp [Mon, 26 Apr 2010 22:05:06 +0000 (15:05 -0700)]
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 04b87d6dfae02e4ecdb5216d12c6cdafd1e8c2b4.

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>
7 years agoBoolean-or short-circuits, so (a || (!a && ...)) is redundant. Simplify.
Jamey Sharp [Wed, 7 Oct 2009 18:06:34 +0000 (11:06 -0700)]
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>
7 years agoExa screen private has SavedSourceValidate, not SourceValidate
Keith Packard [Mon, 26 Apr 2010 18:04:38 +0000 (11:04 -0700)]
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>
7 years agoClarify help strings for disabled features in configure
Yaakov Selkowitz [Mon, 26 Apr 2010 16:39:19 +0000 (11:39 -0500)]
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>
7 years agoCatch when requested SHA1 implementation is missing
Yaakov Selkowitz [Wed, 14 Apr 2010 18:18:28 +0000 (13:18 -0500)]
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>
7 years agoPrefer libsha1 over libgcrypt
Yaakov Selkowitz [Tue, 13 Apr 2010 18:32:51 +0000 (13:32 -0500)]
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>
7 years agoRevert "Disable Record by default."
Yaakov Selkowitz [Fri, 9 Apr 2010 02:55:45 +0000 (21:55 -0500)]
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 3eaecdd66e791e0f3d86b23ce10be057ca44c044.

Conflicts:

configure.ac

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoxfree86: Fix reference to SGML entities
Yaakov Selkowitz [Thu, 25 Mar 2010 08:37:09 +0000 (03:37 -0500)]
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>
7 years agoxfree86: Ignore linuxdoc generated docs
Yaakov Selkowitz [Thu, 25 Mar 2010 08:36:25 +0000 (03:36 -0500)]
xfree86: Ignore linuxdoc generated docs

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Acked-by: Gaetan Nadon <memsize@videotron.ca>
7 years agodmx: use silent rules in doc
Yaakov Selkowitz [Thu, 25 Mar 2010 08:35:36 +0000 (03:35 -0500)]
dmx: use silent rules in doc

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Acked-by: Gaetan Nadon <memsize@videotron.ca>
7 years agodmx: Ignore linuxdoc generated docs
Yaakov Selkowitz [Thu, 25 Mar 2010 08:33:55 +0000 (03:33 -0500)]
dmx: Ignore linuxdoc generated docs

dmx.txt and scaled.txt are generated from SGML, so they probably never
should have been in version control in the first place.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Dan Nicholson <dbn.lists@gmail.com>
7 years agoUse AC_PROG_SED and respect its result
Yaakov Selkowitz [Tue, 23 Mar 2010 09:47:27 +0000 (04:47 -0500)]
Use AC_PROG_SED and respect its result

AC_PROG_SED sets SED as the path to a fully-functional 'sed' (which may
also be called 'gsed' if GNU sed is installed alongside a proprietary
version).

This is a follow up to commit 9be4157391edf0c5fc4ee36adfb1eb1c3bdb8e3b.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
7 years agoexa: avoid calling non existent SourceValidate callback
Jerome Glisse [Mon, 26 Apr 2010 14:01:48 +0000 (16:01 +0200)]
exa: avoid calling non existent SourceValidate callback

In unaccel path we were unconditionaly calling the SourceValidate
callback but in some case it could be NULL. Check if we have a
valid callback before calling it.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoRevert "exa: avoid calling non existent SourceValidate callback"
Keith Packard [Mon, 26 Apr 2010 16:14:22 +0000 (09:14 -0700)]
Revert "exa: avoid calling non existent SourceValidate callback"

This reverts commit daa6f9308fa57e41210f78d92dbdb3f1c8eae6ad.

This one checked pScreen->SourceValidate instead of
pExaScr->SourceValidate which would cause a segfault when
pExaScr->SourceValidate was NULL.

7 years agoexa: avoid calling non existent SourceValidate callback
Jerome Glisse [Mon, 26 Apr 2010 13:55:26 +0000 (15:55 +0200)]
exa: avoid calling non existent SourceValidate callback

In unaccel path we were unconditionaly calling the SourceValidate
callback but in some case it could be NULL. Check if we have a
valid callback before calling it.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoinclude: remove couple of unused structures fields and bump ABI
Tiago Vignatti [Mon, 26 Apr 2010 11:49:25 +0000 (14:49 +0300)]
include: remove couple of unused structures fields and bump ABI

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
7 years agodix and others: remove unused arraySize field from ScreenInfo
Tiago Vignatti [Thu, 22 Apr 2010 12:43:11 +0000 (15:43 +0300)]
dix and others: remove unused arraySize field from ScreenInfo

Bizarre. This seems to never be used before. I left the field in ScreenInfo,
with another name. So, stop looking at it.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
7 years agoxfree86: no need to assign numScreens again
Tiago Vignatti [Thu, 22 Apr 2010 12:48:48 +0000 (15:48 +0300)]
xfree86: no need to assign numScreens again

numScreens is always being assigned to 0 in dix for any server generation.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoXwin: make screens structures run-time adjustable
Jon TURNEY [Fri, 16 Apr 2010 17:13:50 +0000 (18:13 +0100)]
Xwin: make screens structures run-time adjustable

Change g_ScreenInfo, an array of winScreenInfo elements, from a
static array of MAXSCREENS elements, to a dynamically allocated one

Fix up the validation that -screen option screen numbers are
contiguous from zero (which possibly didn't work correctly before
anyhow)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jamey Sharp<jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
7 years agoXwin: Simplify screen option processing
Jon TURNEY [Mon, 12 Apr 2010 19:18:13 +0000 (20:18 +0100)]
Xwin: Simplify screen option processing

Use an instance of the XWin DDX-specific screen info structure to hold
the current default values, to simplify greatly the code for applying
options to all screens and remove all those loops over MAXSCREENS screens
in the command line option processing

Use g_iNumScreens for tracking the current initialized screen count

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
7 years agoxfree86: track screens' installed colormaps as screen privates
Tiago Vignatti [Thu, 22 Apr 2010 17:20:48 +0000 (20:20 +0300)]
xfree86: track screens' installed colormaps as screen privates

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
7 years agomi: track screens' installed colormaps as screen privates
Tiago Vignatti [Thu, 22 Apr 2010 17:20:43 +0000 (20:20 +0300)]
mi: track screens' installed colormaps as screen privates

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
7 years agofb: track screens' installed colormaps as screen privates.
Jamey Sharp [Thu, 22 Apr 2010 05:34:04 +0000 (07:34 +0200)]
fb: 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>
7 years agoxfree86: use screen privates for exclusive DGA clients
Jamey Sharp [Thu, 22 Apr 2010 04:08:29 +0000 (06:08 +0200)]
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>
7 years agoxfree86: use screen privates for Xv offscreen images.
Jamey Sharp [Fri, 23 Apr 2010 04:41:00 +0000 (06:41 +0200)]
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>
7 years agoxfree86: fix not reached code in fi1236 driver from i2c
Tiago Vignatti [Wed, 21 Apr 2010 15:28:13 +0000 (18:28 +0300)]
xfree86: fix not reached code in fi1236 driver from i2c

This issue was introduced in the first dump of the code in 2004. I haven't
check what's the correct fix for it so I simply kept the behaviour of someone
calling this and removed the unreachable code.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoMerge remote branch 'vignatti/for-keith'
Keith Packard [Wed, 21 Apr 2010 23:07:38 +0000 (16:07 -0700)]
Merge remote branch 'vignatti/for-keith'

Conflicts:
exa/exa.c

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoXvfb: Usage message typo fix.
Keith Packard [Wed, 21 Apr 2010 23:00:28 +0000 (16:00 -0700)]
Xvfb: Usage message typo fix.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoRestore some unused win32 debug code accidentally removed with unifdef
Keith Packard [Wed, 21 Apr 2010 22:58:23 +0000 (15:58 -0700)]
Restore some unused win32 debug code accidentally removed with unifdef

unifdef found some code covered by

which it decided to remove. This patch simply restores that in case
someone wants it back.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoRevert "mi: don't thrash resources when displaying the software cursor across screens"
Peter Hutterer [Wed, 21 Apr 2010 01:47:24 +0000 (11:47 +1000)]
Revert "mi: don't thrash resources when displaying the software cursor across screens"

This commit leads to a segfault on the very first XTS test case.

Backtrace:
0: /opt/xorg/bin/Xorg (xorg_backtrace+0x3b) [0x80a33db]
1: /opt/xorg/bin/Xorg (0x8048000+0x62a75) [0x80aaa75]
2: (vdso) (__kernel_rt_sigreturn+0x0) [0x5d140c]
3: /lib/libc.so.6 (0x9bb000+0x73579) [0xa2e579]
4: /lib/libc.so.6 (realloc+0xe0) [0xa2e830]
5: /opt/xorg/bin/Xorg (Xrealloc+0x33) [0x80a3f33]
6: /opt/xorg/bin/Xorg (0x8048000+0x1ab79) [0x8062b79]
7: /opt/xorg/bin/Xorg (0x8048000+0x1ac4e) [0x8062c4e]
8: /opt/xorg/bin/Xorg (RegisterExtensionNames+0x2ce) [0x8062fbe]
9: /opt/xorg/bin/Xorg (AddExtension+0x19a) [0x807bd7a]
10: /opt/xorg//lib/xorg/modules/extensions/libextmod.so (0x728000+0x1169a)
[0x73969a]
11: /opt/xorg/bin/Xorg (InitExtensions+0x85) [0x80c0eb5]
12: /opt/xorg/bin/Xorg (0x8048000+0x1a51d) [0x806251d]
13: /lib/libc.so.6 (__libc_start_main+0xe6) [0x9d1bb6]
14: /opt/xorg/bin/Xorg (0x8048000+0x1a2a1) [0x80622a1]
Segmentation fault at address 0x10b2d5f8

valgrind output:
==5069== Invalid read of size 4
==5069==    at 0x80F928D: FreePicture (picture.c:1531)
==5069==    by 0x818DDEF: miDCDeviceCleanup (midispcur.c:867)
==5069==    by 0x81B97F0: miSpriteDeviceCursorCleanup (misprite.c:968)
==5069==    by 0x80995FA: miPointerDeviceCleanup (mipointer.c:292)
==5069==    by 0x807973E: CloseDevice (devices.c:840)
==5069==    by 0x80799B6: CloseDownDevices (devices.c:933)
==5069==    by 0x8062705: main (main.c:309)
==5069==  Address 0x4cce844 is 12 bytes inside a block of size 84 free'd
==5069==    at 0x40057F6: free (vg_replace_malloc.c:325)
==5069==    by 0x80A3DE0: Xfree (utils.c:1154)
==5069==    by 0x80F9332: FreePicture (picture.c:1576)
==5069==    by 0x80FBB4B: PictureDestroyWindow (picture.c:69)
==5069==    by 0x810B1A3: damageDestroyWindow (damage.c:1840)
==5069==    by 0x80864F1: FreeWindowResources (window.c:846)
==5069==    by 0x8086812: DeleteWindow (window.c:925)
==5069==    by 0x806B53E: FreeClientResources (resource.c:806)
==5069==    by 0x806B60F: FreeAllResources (resource.c:823)
==5069==    by 0x80626E4: main (main.c:299)
==5069==
==5069== Invalid write of size 4
==5069==    at 0x80F9295: FreePicture (picture.c:1531)
==5069==    by 0x818DDEF: miDCDeviceCleanup (midispcur.c:867)
==5069==    by 0x81B97F0: miSpriteDeviceCursorCleanup (misprite.c:968)
==5069==    by 0x80995FA: miPointerDeviceCleanup (mipointer.c:292)
==5069==    by 0x807973E: CloseDevice (devices.c:840)
==5069==    by 0x80799B6: CloseDownDevices (devices.c:933)
==5069==    by 0x8062705: main (main.c:309)
==5069==  Address 0x4cce844 is 12 bytes inside a block of size 84 free'd
==5069==    at 0x40057F6: free (vg_replace_malloc.c:325)
==5069==    by 0x80A3DE0: Xfree (utils.c:1154)
==5069==    by 0x80F9332: FreePicture (picture.c:1576)
==5069==    by 0x80FBB4B: PictureDestroyWindow (picture.c:69)
==5069==    by 0x810B1A3: damageDestroyWindow (damage.c:1840)
==5069==    by 0x80864F1: FreeWindowResources (window.c:846)
==5069==    by 0x8086812: DeleteWindow (window.c:925)
==5069==    by 0x806B53E: FreeClientResources (resource.c:806)
==5069==    by 0x806B60F: FreeAllResources (resource.c:823)
==5069==    by 0x80626E4: main (main.c:299)

XTS test case: Xproto pAllocColor

This reverts commit 00b8b7ad61b6f818271fb4d1e383113170309d72.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoxfree86: fix not reached code in tty code
Tiago Vignatti [Tue, 20 Apr 2010 12:56:58 +0000 (15:56 +0300)]
xfree86: fix not reached code in tty code

CLEARRTS_SUPPORT cannot be triggered at all. Notice that mouse driver manual
page states the support for it though.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoxkb: check for NULL pointer before dereferences it in XkbWriteXKBSymbols
Tiago Vignatti [Tue, 20 Apr 2010 13:26:02 +0000 (16:26 +0300)]
xkb: check for NULL pointer before dereferences it in XkbWriteXKBSymbols

move srv assignment to before it's being used. Also, check for xkb being nil.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoexa: don't need to check for NULL pointer if we already assumed it has a value
Tiago Vignatti [Mon, 19 Apr 2010 17:34:30 +0000 (20:34 +0300)]
exa: don't need to check for NULL pointer if we already assumed it has a value

the alternative would be to check ps in the beginning of the function.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
7 years agoxkb: check for NULL pointer before dereferences it in XkbAddClientResource
Tiago Vignatti [Mon, 19 Apr 2010 17:46:12 +0000 (20:46 +0300)]
xkb: check for NULL pointer before dereferences it in XkbAddClientResource

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
7 years agoXi: check for NULL pointer before dereferences it in ListButtonInfo
Tiago Vignatti [Fri, 16 Apr 2010 15:01:41 +0000 (18:01 +0300)]
Xi: check for NULL pointer before dereferences it in ListButtonInfo

Both dev and dev->button are already used before their checking were being
performed. So check on the beginning.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
7 years agoxfree86: check for NULL pointer before dereferences it in parser code
Tiago Vignatti [Mon, 19 Apr 2010 17:18:51 +0000 (20:18 +0300)]
xfree86: check for NULL pointer before dereferences it in parser code

Seems to be harmless. Meh.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
7 years agoXi: fix not reached code in XSendExtensionEvent
Tiago Vignatti [Fri, 16 Apr 2010 14:08:09 +0000 (17:08 +0300)]
Xi: fix not reached code in XSendExtensionEvent

Error was introduced in 31a7994a. I.e., broken since 2007. I guess nobody uses
XSendExtensionEvent.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
7 years agoxfree86: fix not reached code in parser
Tiago Vignatti [Fri, 16 Apr 2010 13:47:33 +0000 (16:47 +0300)]
xfree86: fix not reached code in parser

...because Error is a macro that returns NULL.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
7 years agomi: check for NULL pointer before dereferences it in miPointerSetPosition
Tiago Vignatti [Fri, 16 Apr 2010 15:35:55 +0000 (18:35 +0300)]
mi: check for NULL pointer before dereferences it in miPointerSetPosition

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoexa: check for NULL pointer before dereferences it
Tiago Vignatti [Fri, 16 Apr 2010 14:50:43 +0000 (17:50 +0300)]
exa: check for NULL pointer before dereferences it

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
7 years agoconfigure: remove unused builtin font macro from autoconf file
Tiago Vignatti [Thu, 25 Mar 2010 16:17:54 +0000 (18:17 +0200)]
configure: remove unused builtin font macro from autoconf file

This should be removed together with 49b93df8.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
7 years agoDeath to Multibuffer extension
Tiago Vignatti [Tue, 30 Mar 2010 16:10:36 +0000 (19:10 +0300)]
Death to Multibuffer extension

The rationale behind is because no sane application will use this when we have
modern APIs such DRI2. Besides, as a fact, xfree86 server has already
deprecated this extension in 1998:

    http://www.xfree86.org/3.3.6/isc7.html

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
7 years agounifdef -B -DRENDER to always include RENDER code
Keith Packard [Mon, 19 Apr 2010 16:26:10 +0000 (09:26 -0700)]
unifdef -B -DRENDER to always include RENDER code

This patch was created with:

git ls-files '*.[ch]' | while read f; do unifdef -B -DRENDER -o $f $f; done

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoMerge remote branch 'whot/for-keith'
Keith Packard [Mon, 19 Apr 2010 05:01:40 +0000 (22:01 -0700)]
Merge remote branch 'whot/for-keith'

7 years agoxkb: rename XkbFakeDeviceButton and XkbFakeDeviceMotion, move into xkbActions.c
Peter Hutterer [Wed, 14 Apr 2010 00:54:29 +0000 (10:54 +1000)]
xkb: rename XkbFakeDeviceButton and XkbFakeDeviceMotion, move into xkbActions.c

The name XkbDDXFakeDeviceButton and XkbDDXFakeDeviceMotion is somewhat
misleading, there's no DDX involved in the game at all anymore.

This removes XkbFakeDeviceMotion and XkbFakeDeviceButton from the API where
it arguably shouldn't have been in the first place.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
7 years agoxkb: purge unneeded includes from ddxDevBtn.c
Peter Hutterer [Tue, 13 Apr 2010 23:48:53 +0000 (09:48 +1000)]
xkb: purge unneeded includes from ddxDevBtn.c

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
7 years agoglx: Drop DestroyWindow hook
Kristian Høgsberg [Fri, 16 Apr 2010 09:55:35 +0000 (05:55 -0400)]
glx: Drop DestroyWindow hook

Now that glx doesn't call DRI2DestroyDrawable anymore, we don't need to
force a specific resource destruction order in the DestroyWindow hook.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
https://bugs.freedesktop.org/show_bug.cgi?id=26394
Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoDRI2: Track DRI2 drawables as resources, not privates
Kristian Høgsberg [Fri, 16 Apr 2010 09:55:34 +0000 (05:55 -0400)]
DRI2: Track DRI2 drawables as resources, not privates

The main motivation here is to have the resource system clean up the
DRI2 drawable automatically so glx doesn't have to.  Right now, the
glx drawable resource must be destroyed before the X drawable, so that
calling DRI2DestroyDrawable doesn't crash.  By making the DRI2
drawable a resource, GLX doesn't have to worry about that and the
resource destruction order becomes irrelevant.

https://bugs.freedesktop.org/show_bug.cgi?id=26394

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoglx: Let the resource system destroy pixmaps
Kristian Høgsberg [Fri, 16 Apr 2010 09:55:33 +0000 (05:55 -0400)]
glx: Let the resource system destroy pixmaps

GLX pbuffers are implemented using a pixmap allocated by the server.
With the change to DRI2 to track DRI2 drawables as resources, we need to make
sure that every drawable we create a DRI2 drawable for has an XID.  By
using the XID of the pbuffer, the resource system will automatically
reclaim the hidden pixmap and the DRI2 drawable when the pbuffer is
destroyed or the client exits.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoglx: Track GLX 1.3 style GLX drawables under their X drawable ID as well
Kristian Høgsberg [Fri, 16 Apr 2010 09:55:32 +0000 (05:55 -0400)]
glx: Track GLX 1.3 style GLX drawables under their X drawable ID as well

This ensures that the DrawableGone callback gets called as necessary
when the X drawable goes away.  Otherwise, using a GLX drawable
(say, glXSwapBuffers) in indirect mode after the X drawable has been
destroyed will crash the server.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoxkb: use GPE for XKB fake motion events.
Peter Hutterer [Tue, 13 Apr 2010 04:44:59 +0000 (14:44 +1000)]
xkb: use GPE for XKB fake motion events.

Section 4.6.1 of the XKB spec says that "the initial event always moves the
cursor the distance specified in the action [...]", so skip the
POINTER_ACCELERATE flag for GPE, it would cause double-acceleration.

Potential regression - GPE expects the coordinates to be either relative or
both. XKB in theory allows for x to be relative and y to be absolute (or
vice versa). Let's pretend that scenario has no users.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
7 years agoxkb: Guard against SIGIO updates during PointerKeys.
Peter Hutterer [Wed, 14 Apr 2010 00:51:41 +0000 (10:51 +1000)]
xkb: Guard against SIGIO updates during PointerKeys.

In theory, an event coming in during GPE could reset our lastSlave, leading
to rather interesting events lateron.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
7 years agoxkb: Post PointerKeys through the XTEST device.
Peter Hutterer [Tue, 13 Apr 2010 04:41:07 +0000 (14:41 +1000)]
xkb: Post PointerKeys through the XTEST device.

Posting an event through a master device may cause pointer jumps once
lastSlave == master, caused by double scaling. To avoid this, post the fake
event generated by XKB through the XTEST device instead.

Fedora bug #560356 <https://bugzilla.redhat.com/560356>
Tested-by: Andrew McNabb
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
7 years agoxf86ScaleAxis: support for high resolution devices
Benjamin Tissoires [Wed, 14 Apr 2010 15:27:51 +0000 (17:27 +0200)]
xf86ScaleAxis: support for high resolution devices

High resolution devices was generating integer overflow.
For instance the wacom Cintiq 21UX has an axis value up to
87000. Thus the term (dSx * (Cx - Rxlow)) is greater than
MAX_INT32.

Using 64bits integer avoids such problem.

Signed-off-by: Philippe Ribet <ribet@cena.fr>
Signed-off-by: Benjamin Tissoires <tissoire@cena.fr>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoMerge remote branch 'whot/for-keith'
Keith Packard [Thu, 15 Apr 2010 22:01:34 +0000 (15:01 -0700)]
Merge remote branch 'whot/for-keith'

7 years agovfb: add a name and type to the pointer and keyboard
Julien Cristau [Tue, 13 Apr 2010 20:28:36 +0000 (22:28 +0200)]
vfb: add a name and type to the pointer and keyboard

Fixes a crash in XIQueryDevice which calls strlen on a NULL pointer.

 #0  strlen () at ../sysdeps/x86_64/strlen.S:31
 #1  0x00000000004c16ed in SizeDeviceInfo (dev=0x969bd0)
     at ../../Xi/xiquerydevice.c:204
 #2  0x00000000004c1a01 in ProcXIQueryDevice (client=0xa57510)
     at ../../Xi/xiquerydevice.c:98

Debian bug#575905 <http://bugs.debian.org/575905>

Reported-by: "Bernhard R. Link" <brlink@debian.org>
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>
7 years agodix: Export AllocDevicePair GetPointerEvents, GetKeyboardEvents and generate_modkeyma...
Adam Tkac [Mon, 22 Mar 2010 13:52:29 +0000 (14:52 +0100)]
dix: Export AllocDevicePair GetPointerEvents, GetKeyboardEvents and generate_modkeymap functions from Xorg.

Those functions are used by TigerVNC libvnc.so module which doesn't
use standard XInput infrastructure but uses same functions like,
for example, XTest devices.

Signed-off-by: Adam Tkac <atkac@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agomi: remove log-spamming bogus error message (#26843)
Peter Hutterer [Tue, 23 Mar 2010 04:35:56 +0000 (14:35 +1000)]
mi: remove log-spamming bogus error message (#26843)

miSpriteRealizeCursor is called whenever a device is set floating and it's
fine to do so, no need for an error message.
Same goes for the other miSprite messages.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agomi: don't thrash resources when displaying the software cursor across screens
Pierre-Loup A. Griffais [Wed, 7 Apr 2010 20:52:47 +0000 (13:52 -0700)]
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>
7 years agodix: fix cursor screen check for xinerama setups.
Tim Yamin [Mon, 8 Mar 2010 02:45:15 +0000 (12:45 +1000)]
dix: fix cursor screen check for xinerama setups.

The de-duplication of CheckPhysLimits 942eae6868b8b0f343b6a added a
condition that is invalid for a Xinerama setup. pScreen is invalid for the
Xinerama case, so comparing it to anything is a bad idea.

Signed-off-by: Tim Yamin <plasm@roo.me.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>