|
|
@ -744,6 +744,7 @@ notify_axis(struct weston_seat *seat, uint32_t time, uint32_t axis, |
|
|
|
value); |
|
|
|
value); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef ENABLE_XKBCOMMON |
|
|
|
WL_EXPORT void |
|
|
|
WL_EXPORT void |
|
|
|
notify_modifiers(struct weston_seat *seat, uint32_t serial) |
|
|
|
notify_modifiers(struct weston_seat *seat, uint32_t serial) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -833,6 +834,18 @@ update_modifier_state(struct weston_seat *seat, uint32_t serial, uint32_t key, |
|
|
|
|
|
|
|
|
|
|
|
notify_modifiers(seat, serial); |
|
|
|
notify_modifiers(seat, serial); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
WL_EXPORT void |
|
|
|
|
|
|
|
notify_modifiers(struct weston_seat *seat, uint32_t serial) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
|
|
|
update_modifier_state(struct weston_seat *seat, uint32_t serial, uint32_t key, |
|
|
|
|
|
|
|
enum wl_keyboard_key_state state) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
WL_EXPORT void |
|
|
|
WL_EXPORT void |
|
|
|
notify_key(struct weston_seat *seat, uint32_t time, uint32_t key, |
|
|
|
notify_key(struct weston_seat *seat, uint32_t time, uint32_t key, |
|
|
@ -1276,16 +1289,12 @@ bind_seat(struct wl_client *client, void *data, uint32_t version, uint32_t id) |
|
|
|
wl_seat_send_name(resource, seat->seat_name); |
|
|
|
wl_seat_send_name(resource, seat->seat_name); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef ENABLE_XKBCOMMON |
|
|
|
int |
|
|
|
int |
|
|
|
weston_compositor_xkb_init(struct weston_compositor *ec, |
|
|
|
weston_compositor_xkb_init(struct weston_compositor *ec, |
|
|
|
struct xkb_rule_names *names) |
|
|
|
struct xkb_rule_names *names) |
|
|
|
{ |
|
|
|
{ |
|
|
|
/*
|
|
|
|
ec->use_xkbcommon = 1; |
|
|
|
* If we're operating in raw keyboard mode, libxkbcommon isn't used and |
|
|
|
|
|
|
|
* shouldn't be initialized. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
if (!ec->use_xkbcommon) |
|
|
|
|
|
|
|
return 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ec->xkb_context == NULL) { |
|
|
|
if (ec->xkb_context == NULL) { |
|
|
|
ec->xkb_context = xkb_context_new(0); |
|
|
|
ec->xkb_context = xkb_context_new(0); |
|
|
@ -1423,6 +1432,19 @@ weston_compositor_build_global_keymap(struct weston_compositor *ec) |
|
|
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
int |
|
|
|
|
|
|
|
weston_compositor_xkb_init(struct weston_compositor *ec, |
|
|
|
|
|
|
|
struct xkb_rule_names *names) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
|
|
|
weston_compositor_xkb_destroy(struct weston_compositor *ec) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
WL_EXPORT int |
|
|
|
WL_EXPORT int |
|
|
|
weston_seat_init_keyboard(struct weston_seat *seat, struct xkb_keymap *keymap) |
|
|
|
weston_seat_init_keyboard(struct weston_seat *seat, struct xkb_keymap *keymap) |
|
|
@ -1432,7 +1454,7 @@ weston_seat_init_keyboard(struct weston_seat *seat, struct xkb_keymap *keymap) |
|
|
|
if (seat->keyboard) |
|
|
|
if (seat->keyboard) |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef ENABLE_XKBCOMMON |
|
|
|
if (seat->compositor->use_xkbcommon) { |
|
|
|
if (seat->compositor->use_xkbcommon) { |
|
|
|
if (keymap != NULL) { |
|
|
|
if (keymap != NULL) { |
|
|
|
seat->xkb_info.keymap = xkb_map_ref(keymap); |
|
|
|
seat->xkb_info.keymap = xkb_map_ref(keymap); |
|
|
@ -1453,6 +1475,7 @@ weston_seat_init_keyboard(struct weston_seat *seat, struct xkb_keymap *keymap) |
|
|
|
|
|
|
|
|
|
|
|
seat->xkb_state.leds = 0; |
|
|
|
seat->xkb_state.leds = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
keyboard = weston_keyboard_create(); |
|
|
|
keyboard = weston_keyboard_create(); |
|
|
|
if (keyboard == NULL) { |
|
|
|
if (keyboard == NULL) { |
|
|
@ -1537,11 +1560,13 @@ weston_seat_release(struct weston_seat *seat) |
|
|
|
wl_list_remove(&seat->link); |
|
|
|
wl_list_remove(&seat->link); |
|
|
|
/* The global object is destroyed at wl_display_destroy() time. */ |
|
|
|
/* The global object is destroyed at wl_display_destroy() time. */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef ENABLE_XKBCOMMON |
|
|
|
if (seat->compositor->use_xkbcommon) { |
|
|
|
if (seat->compositor->use_xkbcommon) { |
|
|
|
if (seat->xkb_state.state != NULL) |
|
|
|
if (seat->xkb_state.state != NULL) |
|
|
|
xkb_state_unref(seat->xkb_state.state); |
|
|
|
xkb_state_unref(seat->xkb_state.state); |
|
|
|
xkb_info_destroy(&seat->xkb_info); |
|
|
|
xkb_info_destroy(&seat->xkb_info); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
if (seat->pointer) |
|
|
|
if (seat->pointer) |
|
|
|
weston_pointer_destroy(seat->pointer); |
|
|
|
weston_pointer_destroy(seat->pointer); |
|
|
|