Commit Graph

7968 Commits

Author SHA1 Message Date
Ben Gamari
07154db4a8 Xi: Remove redundant and incorrect butmap range check
Maps are CARD8s, therefore checking for values above 255 is completely
unnecessary. Moreover, 0 is a valid value for maps, so the check wasn't
even correct to begin with. This fixes bug #22392, which was uncovered
by commit 280b7f92d7.

Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-23 11:53:33 +10:00
Peter Hutterer
96706c24bd dix: fix wrong indices in set_valuator.
Reported-by: Thomas Jaeger
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-22 15:11:26 +10:00
Jeremy Huddleston
ae20e748cd XQuartz: More localization updates
(cherry picked from commit 7fbe974246)
2009-06-19 21:16:47 -07:00
Eamon Walsh
30df49f549 Xi: fix 2 memory leaks.
In ProcXIQueryDevice() and XISendDeviceHierarchyEvent().

Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-06-19 20:29:52 -04:00
Adam Jackson
eb35402d0a pci: Dump vendor/devices ids in the printed device list 2009-06-19 12:42:07 -04:00
Søren Sandmann Pedersen
c733660428 Use pixman_version_string() instead of PIXMAN_VERSION_STRING
Pointed out by Julien Cristau.
2009-06-19 08:37:54 -04:00
Dave Airlie
aef6b904eb fbdev: make entity fail if PCI claimed already.
bad kitty fbdev, been shipping this in Fedora for a while now
2009-06-19 13:28:21 +10:00
Eamon Walsh
3efb23a6c4 xselinux: Add new device permissions for XI2.
Refects the ability of clients to add/remove devices and device properties.

Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-06-18 20:56:19 -04:00
Eamon Walsh
1e060c3d8b xselinux: Move the security class mapping to the header file.
Take the mapping of DixAccess bits to Flask permissions, move it
into the header file, break up the extremely long lines, and
annotate the permission names with the bit being referenced.

Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-06-18 20:56:18 -04:00
Alan Coopersmith
75c51c67b3 Clarify use of and need for mffs vs. ffs
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-06-18 09:49:19 -07:00
Søren Sandmann Pedersen
128cd03eec Fix miComputeCompositeRegion() to follow new clip rules.
Ignore the hierarchy clip, and always apply any client clip after
transformation and repeating.
2009-06-18 12:36:11 -04:00
Søren Sandmann Pedersen
e9aa61e9f0 Fix clipping when windows are used as sources
The new clipping rules:

	- client clips happen after transformation
	- pixels unavailable due to the hierarchy are undefined

The first one is implemented in pixman; the second one is realized by
making a copy of window sources (to prevent out-of-bounds access).
2009-06-18 12:36:11 -04:00
Søren Sandmann Pedersen
d9b5e77a0e Print the current version of pixman. 2009-06-18 12:36:10 -04:00
Peter Hutterer
1e9907499c record: use dixLookupResourceByClass instead of LookupIDByClass.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 15:21:28 +10:00
Peter Hutterer
66089e9129 xfree86: fix SWCursor check in xf86CursorSetCursor.
Wrong check for inputInfo.pointer resulted in a SW cursor being rendered when
the pointer left the screen (in a Xinerama setup).
We must call the sprite rendering function if
- SW cursors are enabled, or
- The current device is not the VCP and not attached to the VCP.

Reported-by: Gordon Yuan <GordonYuan@viatech.com.cn>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 15:04:38 +10:00
David Miller
afa680e495 mi: ignore DGA events in ChangeDeviceID
DGA events don't have a deviceid, so they don't need changing.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 08:23:30 +10:00
Jon TURNEY
cd8abd17ab Cygwin/X: Fix permuted args to InitPointerDeviceStruct()
Fix a minor error in commit a30fef9956,
new btn_labels argument to InitPointerDeviceStruct() wasn't added in
the right place
2009-06-17 14:22:35 +01:00
Benjamin Close
14581afb47 xfree86: correctly define barriers for FreeBSD amd64
Previously when compiling on freebsd amd64 we'd end up at xi86
block (line 1315) which would define mem_barrier and write_mem_barrier
to be NOP's. Instead they should be valid, as per the linux amd64 setup.

This stops the hangs experienced by many when using the nv driver
which would hang due to out of order dma requests as noticed in
http://bugs.freedesktop.org/show_bug.cgi?id=3168

Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com>
2009-06-17 15:58:03 +09:30
Peter Hutterer
e92dcb6ce0 input: unify button numbers on master devices.
Master devices provide the union of all attached slave devices' buttons,
i.e. the number of buttons on the master device is always the number of
buttons of the slave device with the highest number of buttons. When slaves
are attached or detached, the master device adjusts the button number to
reflect the new buttons.

On a slave switch, this slave's button labels are copied into the master (up
to slave->num_buttons). The remaining button labels (if any) stay as they
are. Thus, if any of the higher buttons is still pressed, it reflects the
label of the last pressed device that provided this button.

If two devices press the same button and it is differently labelled the last
pressed one will be reflected in the master device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 15:50:47 +10:00
Peter Hutterer
280b7f92d7 dix: reduce MDs and xtest pointers to 7 buttons by default.
MD's will soon be the union of all devices anyway. XTest pointers are only
for the core protocol XTest stuff, so 7 buttons (lmr + 4 wheel buttons)
should do.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 14:41:50 +10:00
Peter Hutterer
6c7d992735 Require inputproto 1.9.99.12
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 14:41:50 +10:00
Peter Hutterer
09cef75739 Xi: valuator/button labels are called labels now, not 'names'
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 14:41:49 +10:00
Peter Hutterer
bc2ff53650 Xi: copy the valuator mode from SD to MD.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 14:41:49 +10:00
Peter Hutterer
87d1f44bad Xi: copy the button and axes labels into the XIQueryDevice reply.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 14:41:49 +10:00
Peter Hutterer
a30fef9956 input: Add labels to buttons and valuators - ABI_XINPUT_VERSION 7
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 14:41:47 +10:00
Peter Hutterer
17f9723f48 input: bump to ints for deviceids - XI2 requires 16-bit deviceids.
Note: ABI break, but ABI_XINPUT_VERSION has NOT been bumped. Recompile input
drivers.

Revert "Xi: return BadImplementation for deviceids 256 and above"
This reverts commit 2b459f44f3.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 14:40:54 +10:00
Peter Hutterer
cbeb73e205 Xi: return current valuator values in XIQueryDevice.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 14:40:54 +10:00
Peter Hutterer
80837dbefd input: change axisVal from uint to double.
With subpixel support, uint just doesn't cut it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 14:40:53 +10:00
Peter Hutterer
25b6fc4a42 Xi: last_valuator is used like an index, so range it accordingly.
The previous code would always skip the last valuator due to a wrong
upper boundary in the loop. last_valuator is the index of the last set
valuator - which also means it must be initialized to -1, not 0.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 14:40:53 +10:00
Peter Hutterer
3fc762ea94 Xi: Motion events update the device state too.
Without this line the device's axis values don't get updated properly for
pure motion events.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 14:40:53 +10:00
Peter Hutterer
ad6347afea Xi: don't use a constant number for class sizes - use sizeof instead
The protocol is still changing, and having to debug crap like this is
annoying.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 14:40:53 +10:00
Peter Hutterer
d5a15e65b7 Xi: include button state in XIButtonInfo.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 14:40:50 +10:00
Peter Hutterer
01241b4247 Xi: Add support for sourceid in the device classes. 2009-06-17 11:21:19 +10:00
Peter Hutterer
d230742ea8 Xi: namespace XI2 files.
Some files (notably those merged with MPX before XI2 came along) didn't use
a 'xi' prefix. This patch changes all of them to meaningful names.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-17 09:05:22 +10:00
Peter Hutterer
4ddb002b68 xfree86: fix two compiler warnings in xf86vmode.c
xf86vmode.c:1578: warning: pointer targets in passing argument 1 of
‘SwapShorts’ differ in signedness
../../../../include/misc.h:231: note: expected ‘short int *’ but argument is
of type ‘CARD16 *’

xf86vmode.c:1543: warning: unused variable ‘i’

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-17 09:05:22 +10:00
Peter Hutterer
9d039ef504 xfree86: silence a few int10 compiler warnings.
'format ‘%#x’ expects type ‘unsigned int’, but argument 2 has type ‘CARD32’'
and similar.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-17 09:05:22 +10:00
Adam Jackson
fb882b3da1 EDID: Carp about 1.4 monitors with no preferred refresh rate
You would think, having finally tightened down the spec, that
monitor vendors would bother to implement what the spec actually
mandates.  You would be wrong.
2009-06-16 14:58:10 -04:00
Adam Jackson
b2d2af76b4 randr: fix typo in swapped dispatch 2009-06-15 10:10:26 -04:00
Peter Hutterer
1d20b9021e Xi: fix wrong bit->byte conversion in ProcXIQueryPointer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-14 18:47:22 +10:00
Peter Hutterer
9afc3241c1 Xi: remove un-used IsOn macro.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-14 18:47:21 +10:00
Peter Hutterer
b67ff1d6e0 Xi: XISelectEvents/XIGetSelectedEvents use 'win' instead of 'window' now.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-14 11:34:35 +10:00
Benjamin Defnet
b2bf67b61c randr: fix operation order so that rotation+transform works
The matrix multiply to combine rotation and projective transforms was being
done in the wrong order.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-06-11 23:27:36 -07:00
Peter Hutterer
3627215e97 Add check for GNU ld in the test suite.
The GNU linker supports a -wrap option to wrap function calls at link-time.
This allows for easy overriding of functions in the X server with stubs in
the test suite. This functionality is only supported on the GNU linker and
will be used extensively in the tests. Disable the tests if GNU ld is not
available.
2009-06-12 13:39:34 +10:00
Peter Hutterer
5e0ca6fabd input: remove un-used "setter" argument from SetClientPointer.
It's obsolete, not likely to come back, let's drop it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-12 12:37:16 +10:00
Peter Hutterer
e6a18762ef Xi: fix XISetClientPointer return values.
If SetClientPointer fails, the only reason may be that the device is not a
pointer or that the device is an SD. Return BadDevice instead of BadAccess.
(BadAccess is a leftover from the early times of the ClientPointer
implementation when only one client was allowed to set it).

If the window parameter doesn't name a valid window or client, return
BadWindow.

Finally, allow both master keyboards and master pointers as deviceid.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-12 12:37:16 +10:00
Peter Hutterer
ae7dab2a13 Xi: Fix XISetClientPointer swapping.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-12 12:37:16 +10:00
Peter Hutterer
98e8ec8deb Xi: sanitize ProcXIGetClientPointer.
This was quite old code and can be streamlined a bit. The new code is
essentially the same as in ProcXISetClientPointer.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-12 12:37:16 +10:00
Peter Hutterer
96ea82fdac Xi: fix reply swapping in XIGetClientPointer.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-12 12:37:16 +10:00
Adam Jackson
76f25086a9 vfb: Re-enable 30bpp support 2009-06-11 16:34:06 -04:00
Dave Airlie
0de58c88ab xfree86: move didLock assignment down to where the function pointer is valid.
crtc->funcs->lock is NULL, so it's no use calling it here. Move it down so
it's actually defined before we use it.

Introduced with 6f59a81600.

Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-11 14:24:42 +10:00