mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-20 03:30:19 +01:00
libweston: Rename LED_* to WESTON_LED*
This is required to avoid a namespace collision for LED_COMPOSE key code and was introduced withc112760368, "input: Add support for LED_COMPOSE and LED_KANA". If not already done this requires a libweston major version bump. Fixes: #997 Fixes:c112760368, "input: Add support for LED_COMPOSE and LED_KANA USB HID LEDs" Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
parent
82c5b386d8
commit
1a2c25116b
3 changed files with 15 additions and 15 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue