Commit Graph

7935 Commits

Author SHA1 Message Date
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
Peter Hutterer
a85d210b34 Xi: store mask_len before swapping in ProcXIGetSelectedEvents.
Swapping the mask_len and then advancing the pointer by the swapped length
is just a bad idea.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-11 13:42:50 +10:00
Peter Hutterer
5043f42f36 Xi: correct return buffer size for XIGetSelectedEvents.
The maximum number of bytes is calculated by the mask len, and the mask len
is always in 4-byte units. XI2MASKSIZE however is in bytes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-11 13:42:50 +10:00
Peter Hutterer
fcf0c0b8f3 Xi: XISetEventMask needs to clear the mask if len is 0
zero-length masks are supposed to clear the device's mask.
ProcXISelectEvents passes these masks through directly, so we need to clear
the bits here if such a mask is supplied.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-11 13:42:50 +10:00
Peter Hutterer
22b4ac44e4 Xi: XIGetSelectedEvents mustn't returned masks from non-existing devices.
Or devices the client doesn't have XACE permissions for.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-11 13:42:49 +10:00
Peter Hutterer
7868956b0f Xi: ProcXIGetSelectedEvents must use WriteToClient for swapped data.
The data is already swapped before, so we just post it to the client as-is,
without attempting to swap it again.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-11 13:42:49 +10:00
Peter Hutterer
aa2babf11c input: remove dependency on XI2 protocol for XI_LASTEVENT.
inputstr includes XI2proto.h for the sole purpose of XI_LASTEVENT.
However, using XI_LASTEVENT in the server is prone to errors, if the server
is recompiled against a newer version of the protocol it would bump this
variable and associates bits, including potential ABI.

This patch defines an XI2LASTEVENT for use in the server and removes the
XI2proto.h require. XI2LASTEVENT is the current value of XI_LASTEVENT.

This patch is required by components that require access to inputInfo
(currently xf86-video-geode and xf86-video-cirrus) but should not have a
require for the XI2 protocol.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-11 13:42:49 +10:00
Peter Hutterer
77cc816da4 Xi: rename ProcXISelectEvent to ProcXISelectEvents.
The request name has the plural, so let's do it here too. Purely cosmetic
change.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-11 13:42:49 +10:00
Peter Hutterer
9563feeeb5 Xi: start checking for invalid mask bits _after_ LASTEVENT.
Two issues that combined to false positives and false negatives.
- The checking for invalid bits must be performed when there are enough bits
that an event outside of LASTEVENT may be selected.
- The first invalid bit is LASTEVENT + 1, not LASTEVENT.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-11 13:39:48 +10:00
Peter Hutterer
e2fbaebb87 Xi: XISelectEvents returns BadValue for num_masks == 0.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-11 13:39:48 +10:00
Peter Hutterer
cfeb65ac45 Xi: XISelectEvents needs to be at least size 3, not exactly.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-11 13:39:48 +10:00
Peter Hutterer
f3c26034ec Xi: XIQueryDevice should use XIFooClass instead of the old FooClass defines.
This is merely a cosmetic change, the actual values are the same anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-11 13:39:48 +10:00
Peter Hutterer
482cc72aa7 Xi: get the class length before swapping.
Advancing by the already-swapped length lets our pointers point into
nirvana.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-11 13:39:48 +10:00
Peter Hutterer
9974249980 Xi: Swapping 32 bit keycodes requires swapl, not swaps.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-11 13:39:47 +10:00
Dave Airlie
918923e285 glx: fix open-coded linked list removal function
OMG stab stab stab, YALL.

removal function was made of crack, actually truncated the list from
the one after the find point.

However fixing this makes glean makecurrent fail with a GLX error.
2009-06-11 11:09:40 +10:00
Daniel Stone
3ea747c0db KDrive: Warning fixes
xEvent vs. InternalEvent confusion still reigns though.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-06-11 04:09:59 +10:00
Daniel Stone
754be1e2ec KDrive: Xephyr: DRI: Warning fixes
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-06-11 03:56:46 +10:00
Daniel Stone
f534e6bea1 OS: Fix compile warnings
It's a marvel the sigaction() ever actually worked.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-06-11 03:55:57 +10:00
Daniel Stone
305ab237f6 KDrive: Warning fixes and cleanups
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-06-11 03:54:10 +10:00
Adam Jackson
4c8812b544 kdrive: undef PSEUDO8
Whatever that was, it no longer is.
2009-06-10 12:46:19 -04:00
Adam Jackson
973ef5a708 kdrive: Remove a lie about PCMCIA support. 2009-06-10 12:44:45 -04:00
Adam Jackson
e3c65cf1df xephyr: Add -title option. 2009-06-10 12:05:09 -04:00
Colin Harrison
8035223003 Xming: Simplify logic for ownership release of native clipboard
Make the logic simpler for the ownership release of the Windows
clipboard in winclipboardwrappers.c - We've already marked a selection
as unowned if it is owned by our clipboard window

Copyright (C) Colin Harrison 2005-2008
http://www.straightrunning.com/XmingNotes/
http://sourceforge.net/projects/xming/

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-06-10 14:00:43 +01:00
Jon TURNEY
c7d3965bee Cygwin/X: Add a needed inputstr.h
Add a needed inputstr.h to fix build after commit 6d4ffcc9e0

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-06-10 13:13:49 +01:00
Dave Airlie
6d4ffcc9e0 input: move inputstr.h to where its needed.
This stops inputstr.h being needed to be included by output drivers.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-10 11:15:24 +10:00
Benjamin Defnet
6f59a81600 hw/xf86/modes: Set crtc mode/rotation/transform before calling set_mode_major
This moves code out of each implementation of set_mode_major and back into
the X server. The real feature here is that the transform is now available
in the crtc for use by either xf86CrtcRotate or whatever the driver wants to
do. Without this change, the transform was lost for drivers providing the
set_mode_major interface.

Note that users of this API will want to stop smashing the transformPresent
field, and could also stop setting mode/x/y/rotation for new enough X servers,
but there's no reason to make that change as it will break things when
running against older X servers.

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
2009-06-09 16:23:38 -07:00
Federico Mena Quintero
e244a5991e dix/randr: Add missing fields to SRR*NotifyEvent()
Also, remove redundant field swaps and make others match the order in which
they are declared in the xRR*NotifyEvent structs.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-06-09 13:30:45 -07:00
Adam Jackson
746e7b22e1 cvt: Allow multiple-of-60Hz refresh rates for reduced blanking.
Doing so generates the same timings as given in the DMT spec for
120Hz RB, so we should be set there.  Other rates might be legal
too but why push our luck.
2009-06-09 16:20:11 -04:00
Peter Hutterer
2a035600e6 require inputproto 1.9.99.11 2009-06-09 10:34:31 +10:00
Peter Hutterer
c5bebca46f Xi: hierarchy events have a num_info now instead of num_devices.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-09 10:34:31 +10:00
Peter Hutterer
810b74dbbc Xi: change from XICreateMaster to XIAddMaster for consistency.
add/remove is used for slave devices and hierarchy flags.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-09 10:34:30 +10:00
Peter Hutterer
0e66a443a0 Xi: return BadValue for XI_HierarchyChangd mask on devices.
This mask may only be selected for XIAllDevices.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-09 10:34:30 +10:00
Keith Packard
69a9545d1f Make RANDR 'set' timestamps follow client specified time. Bug 21987.
The lastSetTime value which indicates when the configuration within the
server was last changed was not getting set in the appropriate RandR
requests.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-06-08 16:54:28 -07:00
Ben Skeggs
fa18c569ed exa: driver pixmaps enabled if either CreatePixmap or CreatePixmap2 present 2009-06-09 09:24:32 +10:00