Commit Graph

9428 Commits

Author SHA1 Message Date
Tiago Vignatti
49835eec0c 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>
2010-04-21 18:06:59 +03:00
Tiago Vignatti
996c115deb 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>
2010-04-21 18:06:52 +03:00
Tiago Vignatti
0ba82562ee 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>
2010-04-21 18:06:35 +03:00
Keith Packard
28b7b2b8d0 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>
2010-04-19 09:26:10 -07:00
Keith Packard
b3ab978df8 Merge remote branch 'whot/for-keith' 2010-04-18 22:01:40 -07:00
Peter Hutterer
0ad022a729 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>
2010-04-19 09:23:20 +10:00
Peter Hutterer
da4e2e3828 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>
2010-04-19 09:23:15 +10:00
Kristian Høgsberg
a92b2c2c8d 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>
2010-04-16 14:53:35 -07:00
Kristian Høgsberg
1da1f33f2d 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>
2010-04-16 14:53:31 -07:00
Kristian Høgsberg
22da7aa9d7 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>
2010-04-16 14:53:25 -07:00
Kristian Høgsberg
f0006aa58f 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>
2010-04-16 14:53:17 -07:00
Peter Hutterer
f4106c0231 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>
2010-04-16 16:33:38 +10:00
Peter Hutterer
6c42c8c356 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>
2010-04-16 16:33:33 +10:00
Peter Hutterer
108457dff8 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>
2010-04-16 16:30:21 +10:00
Benjamin Tissoires
a780e5b363 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>
2010-04-16 14:39:50 +10:00
Keith Packard
e424d58123 Merge remote branch 'whot/for-keith' 2010-04-15 15:01:34 -07:00
Julien Cristau
0e7703f9b1 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>
2010-04-16 07:53:35 +10:00
Adam Tkac
2f29b163bb 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>
2010-04-16 07:53:29 +10:00
Peter Hutterer
241b53b777 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>
2010-04-16 07:53:24 +10:00
Pierre-Loup A. Griffais
00b8b7ad61 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>
2010-04-16 07:53:19 +10:00
Tim Yamin
5f31e21961 dix: fix cursor screen check for xinerama setups.
The de-duplication of CheckPhysLimits 942eae6868 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>
2010-04-16 07:53:14 +10:00
Jeremy Huddleston
5b0faf3554 XQuartz GLX: Don't let garbage enter our pixel request
https://bugs.freedesktop.org/show_bug.cgi?id=27654

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-15 10:57:04 -07:00
Jeremy Huddleston
fe7778e58e XQuartz: Fix possible NULL dereference in ListenOnOpenFD
<rdar://problem/7862319>

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Marc Majka <majka@apple.com>
2010-04-15 10:57:03 -07:00
Jeremy Huddleston
206531f75c XQuartz: Localization update
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-15 10:57:03 -07:00
Peter Hutterer
9ddbb03fa5 dix: Fix crash in DeliverGrabbedEvents.
If both devices are synchronously grabbed, first with a GrabPointer, then
with a GrabKeyboard (GrabModeSync on both), sync.other of each device points
to the grab of the respective other device.

If the keyboard is then thawed through a AllowSome request, the VCK's
sync.other is reset to NULL. Subsequently, an event on the VCP would crash
the server when dereferencing sync.other on the VCP.

The check's purpose is to compare if the other device is grabbed by the same
client, which should be checked by accessing (dev->deviceGrab->grab->resource).
A check of the server-1.3 sources confirms that.

XTS test case: Xlib13 XAllowEvents 20.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-15 10:26:53 -07:00
Michel Dänzer
7b65175266 EXA: Check sys_ptr isn't NULL before passing it to the UploadToScreen hook.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=27510 .

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-14 17:10:07 -07:00
Julien Cristau
fc5d767408 XGE: don't register an extension event
The GenericEvent is a core event, we never send an extension event, so
don't reserve an id for one.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-13 09:27:32 -07:00
Julien Cristau
0b676acd47 Bump version in configure.ac
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-13 09:24:55 -07:00
Kristian Høgsberg
1760d2bef9 glx: Set the pbuffer bit for dri2 fbconfigs
They've been implemented for a while, but we never advertised them.  All we
need to do is set the GLX_PBUFFER_BIT in the drawable type fbconfig
field when we're using DRI2.

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

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-12 21:42:14 -07:00
Keith Packard
ab60975fe2 Merge remote branch 'jeremyhu/master' 2010-04-12 21:40:41 -07:00
Jeremy Huddleston
59edde7c28 XQuartz: Add a GUI preference for the Alt / Mode_switch toggle
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Kevin Van Vechten <kvv@apple.com>
2010-04-11 16:30:25 -07:00
Jeremy Huddleston
5600f7f001 XQuartz: Customize the NSDefaults id in the man file.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Kevin Van Vechten <kvv@apple.com>
2010-04-11 16:30:22 -07:00
Jeremy Huddleston
840d12c7a6 XQuartz: Add a defaults option to toggle Alt / Mode_switch
See option_sends_alt in Xquartz(1)

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Kevin Van Vechten <kvv@apple.com>
2010-04-11 16:30:19 -07:00
Jeremy Huddleston
d6f160510a XQuartz: Blacklist some oddball legacy Mac keycodes that break wine
http://xquartz.macosforge.org/trac/ticket/295

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Kevin Van Vechten <kvv@apple.com>
2010-04-11 16:30:14 -07:00
Dan Nicholson
adbbc66108 xfree86: Fix priority ordering for ignoring input classes
Commit 8736d112af changed the priority
ordering of the InputClass option merging to be "last match wins". This
fixes the handling of Option "Ignore" to follow that logic.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-04-11 07:29:23 -07:00
Keith Packard
d7c98c1c81 Merge remote branch 'whot/for-keith' 2010-04-07 22:25:51 -07:00
Peter Hutterer
03ccbd2579 xfree86: remove dead input drivers from xorg.conf man page.
These drivers have been deactivated for over a year now, let's not refer
potential users to them.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-08 15:21:01 +10:00
Dan Nicholson
d4dd3d0085 Move 10-evdev.conf to system config dir $datadir/X11/xorg.conf.d
Since the server searches in a vendor specific path now, we can install
the evdev catchall there without disturbing local administration files.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-08 15:21:01 +10:00
Dan Nicholson
95f01bdfee xfree86: Search for a system xorg.conf.d
In addition to the conf files found in /etc/X11 or $sysconfdir/X11 used
for local administration, we also reserve a system directory for vendor
and package usage. The simple search path is:

	/usr/share/X11/xorg.conf.d
	$datadir/X11/xorg.conf.d

Files from these directories will have the lowest config priority. The
directory $datadir/X11/xorg.conf.d is exported from xorg-server.pc in
the variable "sysconfigdir". Packages should install their .conf files
to the directory specified by:

	`pkg-config --variable=sysconfigdir xorg-server`

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-08 15:21:01 +10:00
Dan Nicholson
a1bae63dc6 xfree86: Set a saner search path for xorg.conf.d
There's no reason to carry all the oddities from xorg.conf like appended
hostname to the search path for xorg.conf.d. This changes it to something
very simple:

	/etc/X11/<cmdline>
	$sysconfdir/X11/<cmdline>
	/etc/X11/xorg.conf.d
	$sysconfdir/X11/xorg.conf.d

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-08 15:21:01 +10:00
Dan Nicholson
2ac33888a9 xfree86: Document how -configdir affects the xorg.conf.d search path
Explain the "safe" path dance for -configdir, too.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-08 15:21:01 +10:00
Dan Nicholson
2460e921d1 xfree86: Allow adding sysconfdir and datadir to config search paths
We could just use $projectroot/etc and $projectroot/share, but the user
might have other plans for them.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-08 15:21:00 +10:00
Peter Hutterer
c8a608cb6c config: only match sane devices in 10-evdev.conf
Having a generic catchall also adds devices like accelerometers. These
devices make X unusable, hence restrict matching to "known sane" devices
like pointers, touchpads, keyboards, tablets and touchscreens.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Julien Cristau <jcristau@debian.org>
Acked-by: Dan Nicholson <dbn.lists@gmail.com>
Acked-by: James Cloos <cloos@jhcloos.com>
2010-04-08 15:21:00 +10:00
Pierre-Loup A. Griffais
6b09f66d8c Don't keep a pointer to a possibly freed cursor when changing screens, preventing a crash in xf86CursorEnableDisableFBAccess() trying to restore it.
Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-08 15:21:00 +10:00
Alan Coopersmith
82cf3a4ae0 Convert x86emu fixed size int typedefs to use stdint types
Fixes x86emu builds when using non-gnu compilers now that u64 is required

Before this fix, the u64 type would not be defined, causing
x86emu/sys.c to fail to build:
"sys.c", line 102: syntax error before or at: ldq_u
"sys.c", line 102: syntax error before or at: *

Since Keith requested using <stdint.h>, converted all the x86emu
typedefs to use the stdint types.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-07 16:18:24 -07:00
Paulo Ricardo Zanoni
a9fe7cfa77 dix: be more verbose when we run out of opcodes
If we run out of opcodes, nothing is print on the log, making the
problem hard to debug. In the current Xserver, if you enable some
extensions like multibuffer (+2 events) and use nvidia binary driver (+5
events) you can run out of opcode numbers.

Signed-off-by: Paulo Ricardo Zanoni <pzanoni@mandriva.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-07 16:15:37 -07:00
Gaetan Nadon
6150595bdb doc: specify 1.6.1 as the minimum version for doxygen.
Older versions generate filenames that are different from
the ones listed in the Makefile.

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-07 16:06:32 -07:00
Keith Packard
cbda58c963 Merge remote branch 'yselkowitz/master' 2010-04-07 15:51:38 -07:00
Keith Packard
a7698a6776 Merge remote branch 'jbarnes/master' 2010-04-06 12:36:15 -07:00
Yaakov Selkowitz
c983f40fe4 Cygwin/X: Add configure option for WindowsWM
WindowsWM support is still experimental, and uses the Rootless extension
which currently breaks the simultaneous build of the other DDXs (see
commit b3415187e9).  So we disable it by
default for now; once the latter issue is fixed we can make this 'auto'.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
2010-04-02 13:44:40 -05:00