Rename weston_compositor_xkb_init to weston_compositor_set_xkb_rule_names
authorGiulio Camuffo <giuliocamuffo@gmail.com>
Thu, 2 Jun 2016 18:48:08 +0000 (21:48 +0300)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 3 Jun 2016 10:16:39 +0000 (13:16 +0300)
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>
src/compositor.h
src/input.c
src/main.c

index 0bbf458..c19f991 100644 (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);
 
index 8fe898c..08378d1 100644 (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;
 }
index 475c1d0..39a13cf 100644 (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",