reorder xkb state handling in wlr_keyboard
Created by: Ongy
wlr_keyboard manages the xkb-common state of the compositor. It used to update the state, update the modifiers, then notify the compositor. When [Shift_L] was pressed and released, this resulted in an event chain: Modifiers: Shift Key: Shift_L (Pressed)
Modifiers: Key: Shift_L (Release)
The xkb-docs state that the state should be updated after the key was handled [1], to prevent the new state from influencing the actual key generated.
To achieve this, the event to the compositor is emitted, before wlroots handles the xkb and internal keyboard state.
With this patch applied, the emitted events ill be: Modifiers: Key: Shift_L (Pressed)
Modifiers: Shift Key: Shift_L (Release)
[1] https://xkbcommon.org/doc/current/group__state.html#gac554aa20743a621692c1a744a05e06ce
Testplan: Log the generated keybind checks and see the difference. Might be related to swaywm/sway#1161, though I haven't tested that.