Commit 0358af41 authored by Giulio Camuffo's avatar Giulio Camuffo Committed by Pekka Paalanen

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: default avatarGiulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Quentin Glidic's avatarQuentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
parent ca52b31d
......@@ -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);
......
......@@ -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;
}
......
......@@ -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",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment