For core and XI1 events, store the key_repeat flag in the sequence number
until TryClientEvents. The sequenceNumber is unset until TryClientEvents.
[Also thrown in, some random indentation changes. Thanks]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
In practice, some of the native drivers for older Geode products
have become deprecated due to lack of e.g. libpciaccess upgrade,
but that's OK, since most distributions don't ship them anymore.
In that case, we'll let X server fall back to good old VESA.
dixLookupWindow may return BadMatch if the window in question isn't actually
a window. In this case, GetProperty needs to return BadWindow - not
BadMatch.
X.Org Bug 23562 <http://bugs.freedesktop.org/show_bug.cgi?id=23562>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Provide common #define for invalid window IDs.
Init the sprite's hotPhys, provide a common #define for the initial sprite
position.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Removing the device cursor while the cursor was within the window did not
update the visible sprite until the next enter/leave event.
X.Org Bug 23608 <http://bugs.freedesktop.org/show_bug.cgi?id=23608>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The pointer advanced 12 bytes too short. Rather unfortunate if both the code
and the test have the same bug.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Bits above XI2LASTEVENT are invalid and cause in BadValues. These checks
must be performed anywhere where a mask_len parameter is given.
This patch also adds the missing checks to grab masks.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
A grab mask provided in the request may be larger than the one used in the
server. Cut down to size before memcopying.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Fixes crash if the first XISelectEvents has a zero sized event mask.
Fixes crash if the mask provided is larger than others->xi2mask[].
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
masks can be of arbitrary length. If the client did not initialize mask_len,
some sort of boundary check is needed to avoid running over memory.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Leave consoleFd open over the course of the server, even though any use
of it in this context is likely to be disastrous.
Signed-off-by: Michael Witrant <mike@lepton.fr>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Note that the Xi events are critical and should thus cause a flush to
the client when an input event is pending.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
A missing break meant that ButtonPress would fall through into
ButtonRelease, but luckily it appears to have been completely harmless.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
xf86SlowBCopyToBus and xf86SlowBCopyFromBus cause segfaults on my
system.
Also remove associated slowbcopy_tobus/slowbcopy_frombus macros.
Signed-off-by: Matt Turner <mattst88@gmail.com>
BUSmemcpy.c provides xf86BusToMem and xf86MemToBus, which are are memcpy
wrappers written to avoid glibc's memcpy on Alpha. glibc'c memcpy on
Alpha has improved much since this was written, so it's no longer
needed. Neither function is used inside the xserver, and no module on
my machine uses either as well.
Signed-off-by: Matt Turner <mattst88@gmail.com>
All architectures should be able to use the same unaligned access code,
regardless of whether they need special unaligned access instructions.
Let's let gcc do the heavy lifting.
In the case that we're not using a gcc-compatible compiler, use memmove.
The xserver already requires pixman, so include pixman.h for its uint*_t
types.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Checks for __GNUC__ are superfluous since the only other compiler for
the platform is Compaq C, and it doesn't support GCC style inline
assembly.
Signed-off-by: Matt Turner <mattst88@gmail.com>