swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit 402420ff88249298e72c5d513ba49cf7fbf473c2
parent 0dff35ad9b80fc62e6b48417f78c24df6648c9d2
Author: Michael Forney <mforney@mforney.org>
Date:   Sat, 31 Oct 2015 05:33:56 +0000

Send wl_keyboard.{modifiers,enter} *after* keymap

This fixes a crash in mpv, which creates the xkb state upon keymap, and tries
to use it upon modifiers (even if it hasn't been created yet).

Diffstat:
Mlibswc/keyboard.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libswc/keyboard.c b/libswc/keyboard.c @@ -298,11 +298,12 @@ keyboard_bind(struct keyboard *keyboard, struct wl_client *client, uint32_t vers client_resource = wl_resource_create(client, &wl_keyboard_interface, version, id); wl_resource_set_implementation(client_resource, &keyboard_implementation, keyboard, &unbind); - input_focus_add_resource(&keyboard->focus, client_resource); /* Subtract one to remove terminating NULL character. */ wl_keyboard_send_keymap(client_resource, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1, keyboard->xkb.keymap.fd, keyboard->xkb.keymap.size - 1); + input_focus_add_resource(&keyboard->focus, client_resource); + if (version >= 4) wl_keyboard_send_repeat_info(client_resource, repeat_rate, repeat_delay);