input: include effective modifiers in device events.

Require inputproto 1.9.99.13

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2009-06-26 09:12:47 +10:00
parent 78aedbe609
commit 9f1570c8f4
4 changed files with 9 additions and 1 deletions

View File

@ -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);

View File

@ -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

View File

@ -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++)

View File

@ -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 */