summaryrefslogtreecommitdiff
path: root/mi/mieq.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-10-02 13:28:40 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-10-02 13:28:40 +0930
commit2b075e97ec913ebe19290181e36bb169410b820b (patch)
tree7bedce8082ab85e674766368bead46feb6bfbb2f /mi/mieq.c
parent45ec6cd1fb242363c91ad8af1fd4a27a7f02621a (diff)
mi: switch core keyboard on XI events, not only on core events.
We only get core events through the EQ in exceptional cases, so make sure we actually swap the core keymap for XI events as well. Gives us back the ability to have multiple keyboard layouts simultaneously.
Diffstat (limited to 'mi/mieq.c')
-rw-r--r--mi/mieq.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/mi/mieq.c b/mi/mieq.c
index 9e0f5befb..f5e119efb 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -267,10 +267,12 @@ mieqProcessInputEvents(void)
return;
}
- /* If this is a core event, make sure our keymap, et al, is
- * changed to suit. */
- if (e->events->event[0].u.u.type == KeyPress ||
- e->events->event[0].u.u.type == KeyRelease) {
+ /* Make sure our keymap, et al, is changed to suit. */
+ if ((e->events->event[0].u.u.type == DeviceKeyPress ||
+ e->events->event[0].u.u.type == DeviceKeyRelease ||
+ e->events->event[0].u.u.type == KeyPress ||
+ e->events->event[0].u.u.type == KeyRelease) &&
+ e->pDev->coreEvents) {
SwitchCoreKeyboard(e->pDev);
}