xwayland: Don't run key behaviors and actions

Consider the following keymap:

```xkb
xkb_keymap {
    xkb_keycodes {
        <compose> = 135;
    };
    xkb_symbols {
        key <compose> {
            [ SetGroup(group = +1) ]
        };
    };
};
```

When the user presses the compose key, the following happens:

1. The compositor forwards the key to Xwayland.
2. Xwayland executes the SetGroup action and sets the base_group to 1
   and the effective group to 1.
3. The compositor updates its own state and sends the effective group,
   1, to Xwayland.
4. Xwayland sets the locked group to 1 and the effective group to
   1 + 1 = 2.

This is wrong since pressing compose should set the effective group to 1
but to X applications the effective group appears to be 2.

This commit makes it so that Xwayland completely ignores the key
behaviors and actions of the keymap and only updates the modifier and
group components in response to the wayland modifiers events.

Signed-off-by: Julian Orth <ju.orth@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1758>
(cherry picked from commit 45c1d22ff6)
This commit is contained in:
Julian Orth
2025-01-11 17:50:12 +01:00
committed by Alan Coopersmith
parent c74a340dc6
commit d038d2c080
5 changed files with 15 additions and 7 deletions

View File

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