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 <giuliocamuffo@gmail.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
Giulio Camuffo 2016-06-02 21:48:08 +03:00 committed by Pekka Paalanen
parent ca52b31d3f
commit 0358af419b
3 changed files with 9 additions and 9 deletions

View file

@ -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);

View file

@ -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;
}

View file

@ -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",