Skip to content
Snippets Groups Projects
Commit 1a2c2511 authored by Marius Vlad's avatar Marius Vlad Committed by Marius Vlad
Browse files

libweston: Rename LED_* to WESTON_LED*


This is required to avoid a namespace collision for LED_COMPOSE key
code and was introduced with c1127603, "input: Add support for
LED_COMPOSE and LED_KANA".

If not already done this requires a libweston major version bump.

Fixes: #997
Fixes: c1127603, "input: Add support for LED_COMPOSE and LED_KANA
USB HID LEDs"

Signed-off-by: default avatarMarius Vlad <marius.vlad@collabora.com>
parent 82c5b386
No related branches found
No related tags found
1 merge request!1698libweston: Rename LED_* to WESTON_LED*
......@@ -107,12 +107,12 @@ enum weston_keyboard_locks {
};
enum weston_led {
LED_NUM_LOCK = (1 << 0),
LED_CAPS_LOCK = (1 << 1),
LED_SCROLL_LOCK = (1 << 2),
WESTON_LED_NUM_LOCK = (1 << 0),
WESTON_LED_CAPS_LOCK = (1 << 1),
WESTON_LED_SCROLL_LOCK = (1 << 2),
#ifdef HAVE_COMPOSE_AND_KANA
LED_COMPOSE = (1 << 3),
LED_KANA = (1 << 4),
WESTON_LED_COMPOSE = (1 << 3),
WESTON_LED_KANA = (1 << 4),
#endif
};
......
......@@ -2518,20 +2518,20 @@ notify_modifiers(struct weston_seat *seat, uint32_t serial)
/* Finally, notify the compositor that LEDs have changed. */
if (xkb_state_led_index_is_active(keyboard->xkb_state.state,
keyboard->xkb_info->num_led))
leds |= LED_NUM_LOCK;
leds |= WESTON_LED_NUM_LOCK;
if (xkb_state_led_index_is_active(keyboard->xkb_state.state,
keyboard->xkb_info->caps_led))
leds |= LED_CAPS_LOCK;
leds |= WESTON_LED_CAPS_LOCK;
if (xkb_state_led_index_is_active(keyboard->xkb_state.state,
keyboard->xkb_info->scroll_led))
leds |= LED_SCROLL_LOCK;
leds |= WESTON_LED_SCROLL_LOCK;
#ifdef HAVE_COMPOSE_AND_KANA
if (xkb_state_led_index_is_active(keyboard->xkb_state.state,
keyboard->xkb_info->compose_led))
leds |= LED_COMPOSE;
leds |= WESTON_LED_COMPOSE;
if (xkb_state_led_index_is_active(keyboard->xkb_state.state,
keyboard->xkb_info->kana_led))
leds |= LED_KANA;
leds |= WESTON_LED_KANA;
#endif
if (leds != keyboard->xkb_state.leds && seat->led_update)
seat->led_update(seat, leds);
......
......@@ -57,16 +57,16 @@ evdev_led_update(struct evdev_device *device, enum weston_led weston_leds)
{
enum libinput_led leds = 0;
if (weston_leds & LED_NUM_LOCK)
if (weston_leds & WESTON_LED_NUM_LOCK)
leds |= LIBINPUT_LED_NUM_LOCK;
if (weston_leds & LED_CAPS_LOCK)
if (weston_leds & WESTON_LED_CAPS_LOCK)
leds |= LIBINPUT_LED_CAPS_LOCK;
if (weston_leds & LED_SCROLL_LOCK)
if (weston_leds & WESTON_LED_SCROLL_LOCK)
leds |= LIBINPUT_LED_SCROLL_LOCK;
#ifdef HAVE_COMPOSE_AND_KANA
if (weston_leds & LED_COMPOSE)
if (weston_leds & WESTON_LED_COMPOSE)
leds |= LIBINPUT_LED_COMPOSE;
if (weston_leds & LED_KANA)
if (weston_leds & WESTON_LED_KANA)
leds |= LIBINPUT_LED_KANA;
#endif
libinput_device_led_update(device->device, leds);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment