diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-06-26 09:12:47 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-07-12 16:57:08 +1000 |
commit | 9f1570c8f4f549cdd2fbae1234011290fcc73e18 (patch) | |
tree | 749231427ef1a93e41d3b289926d08b4784a0a89 | |
parent | 78aedbe609e309446e71835ed15e4557d3ccf723 (diff) |
input: include effective modifiers in device events.
Require inputproto 1.9.99.13
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | Xi/exevents.c | 4 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | dix/eventconvert.c | 2 | ||||
-rw-r--r-- | include/events.h | 2 |
4 files changed, 9 insertions, 1 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index 34fdf5007..c575bb42a 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -1026,10 +1026,12 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) event->mods.base = state->base_mods; event->mods.latched = state->latched_mods; event->mods.locked = state->locked_mods; + event->mods.effective = state->mods; event->group.base = state->base_group; event->group.latched = state->latched_group; event->group.locked = state->locked_group; + event->group.effective = state->group; } ret = UpdateDeviceState(device, event); @@ -1274,10 +1276,12 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, xi2event->mods.base_mods = dev->key->xkbInfo->state.base_mods; xi2event->mods.latched_mods = dev->key->xkbInfo->state.latched_mods; xi2event->mods.locked_mods = dev->key->xkbInfo->state.locked_mods; + xi2event->mods.effective_mods = dev->key->xkbInfo->state.mods; xi2event->group.base_group = dev->key->xkbInfo->state.base_group; xi2event->group.latched_group = dev->key->xkbInfo->state.latched_group; xi2event->group.locked_group = dev->key->xkbInfo->state.locked_group; + xi2event->group.effective_group = dev->key->xkbInfo->state.group; } FixUpEventFromWindow(dev, (xEvent*)xi2event, pWin, None, FALSE); diff --git a/configure.ac b/configure.ac index a2e008041..25c5c5e73 100644 --- a/configure.ac +++ b/configure.ac @@ -704,7 +704,7 @@ XEXT_LIB='$(top_builddir)/Xext/libXext.la' XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la' dnl Core modules for most extensions, et al. -REQUIRED_MODULES="[randrproto >= 1.2.99.3] [renderproto >= 0.9.3] [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.3] [xproto >= 7.0.13] [xtrans >= 1.2.2] bigreqsproto resourceproto fontsproto [inputproto >= 1.9.99.12] [kbproto >= 1.0.3]" +REQUIRED_MODULES="[randrproto >= 1.2.99.3] [renderproto >= 0.9.3] [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.3] [xproto >= 7.0.13] [xtrans >= 1.2.2] bigreqsproto resourceproto fontsproto [inputproto >= 1.9.99.13] [kbproto >= 1.0.3]" REQUIRED_LIBS="xfont xau fontenc [pixman-1 >= 0.15.12]" dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas diff --git a/dix/eventconvert.c b/dix/eventconvert.c index ac2b0c310..a65bf68da 100644 --- a/dix/eventconvert.c +++ b/dix/eventconvert.c @@ -417,10 +417,12 @@ eventToDeviceEvent(DeviceEvent *ev, xEvent **xi) xde->mods.base_mods = ev->mods.base; xde->mods.latched_mods = ev->mods.latched; xde->mods.locked_mods = ev->mods.locked; + xde->mods.effective_mods = ev->mods.effective; xde->group.base_group = ev->group.base; xde->group.latched_group = ev->group.latched; xde->group.locked_group = ev->group.locked; + xde->group.effective_group = ev->group.effective; ptr = (char*)&xde[1]; for (i = 0; i < sizeof(ev->buttons) * 8; i++) diff --git a/include/events.h b/include/events.h index f6405c5c2..d34637eba 100644 --- a/include/events.h +++ b/include/events.h @@ -101,11 +101,13 @@ typedef struct uint32_t base; /**< XKB base modifiers */ uint32_t latched; /**< XKB latched modifiers */ uint32_t locked; /**< XKB locked modifiers */ + uint32_t effective;/**< XKB effective modifiers */ } mods; struct { uint8_t base; /**< XKB base group */ uint8_t latched; /**< XKB latched group */ uint8_t locked; /**< XKB locked group */ + uint8_t effective;/**< XKB effective group */ } group; Window root; /**< Root window of the event */ int corestate; /**< Core key/button state BEFORE the event */ |