mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 19:40:43 -05:00
backends/x11: Interpret keycode correctly
Currently, when a remote desktop user submits a keycode, it will be interpreted differently, when using the x11 session, instead of a wayland session. In a wayland session, submitting a keycode will have the expected result (as if the key was pressed locally). In a x11 session, this is not the case. Instead of getting the expected key, some other key will be pressed (or sometimes even none). The reason for this is that the native backend interprets the keycode as evdev keycode and the x11 backend interprets the keycode as xkb keycode. To ensure that both backends produce the same behaviour when submitting a keycode, fix the x11 backend to always interpret the keycode as evdev keycode, instead of a xkb keycode. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1732>
This commit is contained in:
parent
ff48f6c26b
commit
72cfe9b3fd
@ -159,7 +159,7 @@ meta_virtual_input_device_x11_notify_key (ClutterVirtualInputDevice *virtual_dev
|
|||||||
ClutterKeyState key_state)
|
ClutterKeyState key_state)
|
||||||
{
|
{
|
||||||
XTestFakeKeyEvent (clutter_x11_get_default_display (),
|
XTestFakeKeyEvent (clutter_x11_get_default_display (),
|
||||||
key, key_state == CLUTTER_KEY_STATE_PRESSED, 0);
|
key + 8, key_state == CLUTTER_KEY_STATE_PRESSED, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user