drv and idev are only set for SDs, but are only dereferenced for SDs too, so
initializing them to NULL is safe.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
(cherry picked from commit 8e32791349)
When leaving 3D games such as quake3 or sauerbraten, a cursor may stay on the
screen. This is caused by one run of SW rendering for the SD, even though the
SD was attached to the VCP and thus has HW rendering capabilities.
Check for the SD's attachment (like in all other functions) before deciding on
SW or HW rendering.
X.Org Bug 16805 <http://bugs.freedesktop.org/show_bug.cgi?id=16805>
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
(cherry picked from commit bb072019fa)
If no rules file is given, simply re-use the previous one. If no RF is given
the first time this function is called, use the built-in default.
This includes fixing the built-in default to something that actually exists.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
(cherry picked from commit 463e02e7de)
The VCP doesn't need to update the valuators anyway since it cannot send XI
events. Just skip that bit.
X.Org Bug 18882 <http://bugs.freedesktop.org/show_bug.cgi?id=18882>
Signed-off-by: Keith Packard <keithp@keithp.com>
When a driver uses a crtc during device detection, the scrn has not yet been
configured and virtualX/virtualY are still zero. This caused the X server
to try and allocate a shadow frame buffer, which couldn't work.
Detect this by checking for zero virtualX/virtualY values.
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 063eb6743c)
pScreen->width/height are not initialized when doing initial mode setting,
which makes this function incorrectly fail. Using scrn->virtualX should work
in all cases though.
Bug 19017 reports a crash in xf86CrtcSetModeTransform when doing a modeset
for output probing, long before the screen array is initialized; that was
caused by a work-around to set pScreen->width/height so that xf86CrtcFitsScreen
could find the right values.
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit fde2f96103)
This avoids a race condition for drivers which mis-order the fd close and
signal disable.
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 29a5b0596b)
The shadow frame buffer and other data used for rotation need to be freed
when the crtc is disabled, not just when rotation is disabled.
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 1ba4cbb159)
vm86 mode is a bad idea anyway, and using the emulator everywhere
means we get a consistent set of bugs.
(cherry picked from commit 58a27d2932)
Signed-off-by: Keith Packard <keithp@keithp.com>
We'd like to do soft repeat in the server for all keys. Remove obscure check, that'd
prevent the server from autorepeating when delay is set to exactly 660ms and rate is
set to exactly 25 (interval=40).
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit bbf811514d)
Signed-off-by: Keith Packard <keithp@keithp.com>
Just ignore devices after MAXDEVICES has been reached, but warn the user that
the devices are ignored.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Follow-up to 4971315296. countValuatorEvents was copied from GKVE where it
was obviously broken but nobody noticed. GPE had the correct version, but that
one got lost during de-duplication. Restoring the correct calculation - if we
have 6 valuators, we want 1 valuator event, not 2.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
(cherry picked from commit ee1a6c2841)
Signed-off-by: Keith Packard <keithp@keithp.com>
The kbd driver may send events during device initialisation, and these events
need the EQ set up already.
X.Org Bug 18890 <http://bugs.freedesktop.org/show_bug.cgi?id=18890>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 39db182b63)
Signed-off-by: Keith Packard <keithp@keithp.com>
- pScreen->width and height were zero, so it didn't "fit" the screen.
(cherry picked from commit ffb484f7ef)
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Timo Aaltonen <tjaalton@cc.hut.fi>
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
(cherry picked from commit dd128ddcdc)
Signed-off-by: Keith Packard <keithp@keithp.com>
Fix a memory leak in ProcRRGetCrtcTransform() while I'm at it.
Signed-off-by: Julien Cristau <jcristau@debian.org>
Cc: Keith Packard <keithp@keithp.com>
(cherry picked from commit 0b5ecabfb8)
Signed-off-by: Keith Packard <keithp@keithp.com>
CamelCase can be taken too far, and AFAICT there's no consumers of that
function yet anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>