weston_compositor_xkb_destroy() is called automatically so having only weston_compositor_xkb_init() to be called by the user was a bit weird. So rename it so that it makes more sense. Also export it, since libweston compositors need to call it. ---
v2: renamed xkb_init to set_xkb_rule_names src/compositor.h | 4 ++-- src/input.c | 12 ++++++------ src/main.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/compositor.h b/src/compositor.h index 0bbf458..c19f991 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -1537,8 +1537,8 @@ weston_seat_update_keymap(struct weston_seat *seat, struct xkb_keymap *keymap); void weston_seat_release(struct weston_seat *seat); int -weston_compositor_xkb_init(struct weston_compositor *ec, - struct xkb_rule_names *names); +weston_compositor_set_xkb_rule_names(struct weston_compositor *ec, + struct xkb_rule_names *names); void weston_compositor_xkb_destroy(struct weston_compositor *ec); diff --git a/src/input.c b/src/input.c index 8fe898c..08378d1 100644 --- a/src/input.c +++ b/src/input.c @@ -2277,9 +2277,9 @@ bind_seat(struct wl_client *client, void *data, uint32_t version, uint32_t id) } #ifdef ENABLE_XKBCOMMON -int -weston_compositor_xkb_init(struct weston_compositor *ec, - struct xkb_rule_names *names) +WL_EXPORT int +weston_compositor_set_xkb_rule_names(struct weston_compositor *ec, + struct xkb_rule_names *names) { ec->use_xkbcommon = 1; @@ -2442,9 +2442,9 @@ weston_compositor_build_global_keymap(struct weston_compositor *ec) return 0; } #else -int -weston_compositor_xkb_init(struct weston_compositor *ec, - struct xkb_rule_names *names) +WL_EXPORT int +weston_compositor_set_xkb_rule_names(struct weston_compositor *ec, + struct xkb_rule_names *names) { return 0; } diff --git a/src/main.c b/src/main.c index 3279ac6..bb1dd94 100644 --- a/src/main.c +++ b/src/main.c @@ -524,7 +524,7 @@ weston_compositor_init_config(struct weston_compositor *ec, weston_config_section_get_string(s, "keymap_options", (char **) &xkb_names.options, NULL); - if (weston_compositor_xkb_init(ec, &xkb_names) < 0) + if (weston_compositor_set_xkb_rule_names(ec, &xkb_names) < 0) return -1; weston_config_section_get_int(s, "repeat-rate", -- 2.8.3 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel