summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-01-12 14:42:02 +1030
committerPeter Hutterer <whot@hyena.localdomain>2007-01-12 14:42:02 +1030
commitba547d4f6a2707f51f0d826389d2d418fb62367a (patch)
tree5723c92c906c636d5d11ff7f8dcc002aeeee220c
parent5e2f8dee6331645fcbd2734c43698eb4f9c5b116 (diff)
mi: Quick fix to stop segfault on non-core keyboards.
-rw-r--r--dix/cursor.c1
-rw-r--r--mi/mieq.c8
2 files changed, 8 insertions, 1 deletions
diff --git a/dix/cursor.c b/dix/cursor.c
index b58a7bf81..cf515c11a 100644
--- a/dix/cursor.c
+++ b/dix/cursor.c
@@ -117,7 +117,6 @@ FreeCursor(pointer value, XID cid)
ScreenPtr pscr;
DeviceIntPtr pDev;
- MPXDBG("freecursor refcount %d\n", pCurs->refcnt);
if ( --pCurs->refcnt != 0)
return(Success);
diff --git a/mi/mieq.c b/mi/mieq.c
index 0744e6c2c..b336277d4 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -231,6 +231,14 @@ mieqProcessInputEvents()
dev = e->pDev;
}
+ /* FIXME: Keyboard extension devices do not have devPrivates
+ * initialized, resulting in a segfault in XkbHandleActions. */
+ if (e->event[0].u.u.type == DeviceKeyPress ||
+ e->event[0].u.u.type == DeviceKeyRelease ||
+ e->event[0].u.u.type == KeyPress ||
+ e->event[0].u.u.type == KeyRelease)
+ e->pDev = dev = inputInfo.keyboard;
+
/* MPX devices send both core and Xi events.
* Use dev to get the correct processing function but supply
* e->pDev to pass the correct device