diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h index b6eb80622..fffeb82c9 100644 --- a/hw/xfree86/common/xf86Module.h +++ b/hw/xfree86/common/xf86Module.h @@ -75,7 +75,7 @@ */ #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) #define ABI_VIDEODRV_VERSION SET_ABI_VERSION(27, 0) -#define ABI_XINPUT_VERSION SET_ABI_VERSION(24, 4) +#define ABI_XINPUT_VERSION SET_ABI_VERSION(25, 0) #define ABI_EXTENSION_VERSION SET_ABI_VERSION(10, 0) #define MODINFOSTRING1 0xef23fdc5 diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index df2ed6907..f62cb7a25 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -1288,11 +1288,12 @@ keyboard_handle_modifiers(void *data, struct wl_keyboard *keyboard, old_state = dev->key->xkbInfo->state; new_state = &dev->key->xkbInfo->state; + new_state->base_group = 0; + new_state->latched_group = 0; new_state->locked_group = group & XkbAllGroupsMask; new_state->base_mods = mods_depressed & XkbAllModifiersMask; + new_state->latched_mods = mods_latched & XkbAllModifiersMask; new_state->locked_mods = mods_locked & XkbAllModifiersMask; - XkbLatchModifiers(dev, XkbAllModifiersMask, - mods_latched & XkbAllModifiersMask); XkbComputeDerivedState(dev->key->xkbInfo); @@ -1680,6 +1681,7 @@ add_device(struct xwl_seat *xwl_seat, dev->public.devicePrivate = xwl_seat; dev->type = SLAVE; dev->spriteInfo->spriteOwner = FALSE; + dev->ignoreXkbActionsBehaviors = TRUE; return dev; } @@ -3634,6 +3636,7 @@ InitInput(int argc, char *argv[]) mieqInit(); + inputInfo.keyboard->ignoreXkbActionsBehaviors = TRUE; xwl_screen->input_registry = wl_display_get_registry(xwl_screen->display); wl_registry_add_listener(xwl_screen->input_registry, &input_listener, xwl_screen); diff --git a/include/inputstr.h b/include/inputstr.h index 24dd48841..269399e1d 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -631,6 +631,8 @@ typedef struct _DeviceIntRec { DeviceSendEventsProc sendEventsProc; struct _SyncCounter *idle_counter; + + Bool ignoreXkbActionsBehaviors; /* TRUE if keys don't trigger behaviors and actions */ } DeviceIntRec; typedef struct { diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 1743e107f..64801a42f 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -1372,9 +1372,12 @@ XkbHandleActions(DeviceIntPtr dev, DeviceIntPtr kbd, DeviceEvent *event) (event->type == ET_ButtonPress)); if (pressEvent) { - if (keyEvent) - act = XkbGetKeyAction(xkbi, &xkbi->state, key); - else { + if (keyEvent) { + if (kbd->ignoreXkbActionsBehaviors) + act.type = XkbSA_NoAction; + else + act = XkbGetKeyAction(xkbi, &xkbi->state, key); + } else { act = XkbGetButtonAction(kbd, dev, key); key |= BTN_ACT_FLAG; } diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c index 19dce29ab..f768bedff 100644 --- a/xkb/xkbPrKeyEv.c +++ b/xkb/xkbPrKeyEv.c @@ -67,7 +67,7 @@ XkbProcessKeyboardEvent(DeviceEvent *event, DeviceIntPtr keybd) /* do anything to implement the behavior, but it *does* report that */ /* key is hardwired */ - if (!(behavior.type & XkbKB_Permanent)) { + if (!keybd->ignoreXkbActionsBehaviors && !(behavior.type & XkbKB_Permanent)) { switch (behavior.type) { case XkbKB_Default: /* Neither of these should happen in practice, but ignore them