From 0358af419b3fcce6764f4a57d3daf9bdce68cb12 Mon Sep 17 00:00:00 2001 From: Giulio Camuffo Date: Thu, 2 Jun 2016 21:48:08 +0300 Subject: [PATCH] Rename weston_compositor_xkb_init to weston_compositor_set_xkb_rule_names 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. Signed-off-by: Giulio Camuffo Reviewed-by: Quentin Glidic Reviewed-by: Pekka Paalanen --- 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 475c1d0..39a13cf 100644 --- a/src/main.c +++ b/src/main.c @@ -509,7 +509,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.7.4